You can go one better than this, even... use PHP to construct a single SQL query using the IN( ) comparator, ie:
<?php // NOTE: this assumes that 0 is never a valid id; I just // stuck it in to make the comma-delimiting come out right $query = "DELETE FROM tablename WHERE id IN ( 0"; foreach($_POST["del"] as $val) $query .= ', '.$val; $query .= ' )'; [connect] [query] [close connection] ?> "Olinux" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > to make it a little better, make one connection to the > db before you loop and then close the connection > > [connect] > foreach loop > [close connect] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php