Re: deleting muliple feilds from a table using an array

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

 



On 24/03/06, benifactor <snorris17@xxxxxxx> wrote:
>
> //$del will look like 38, 40, 43
>
> $query = "delete From news where id = '$del'";
>
> 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.
>

DELETE FROM news WHERE id IN (38, 40, 43)

 -robin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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