deleting muliple feilds from a table using an array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



example code:
//implode the value of the submitted form
//$del will look like 38, 40, 43 
$del = implode(",", $idd);
//create query for the deletion of values from submited form
$query = "delete From news where id = '$del'";
//execute query
mysql_query($query) or die(mysql_error());
//echo sucess message
echo("<b><center>The Post has been deleted...</b></center>");


here is what my problem is...

This code will only delete the first value of $idd. what i think is wrong is i have the incorrect syntax to delete multiple feilds from a table if some one can help me it would be greatly appreactiated.

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux