delete multiple records with one query

From: Date: Tue, 02 Jul 2002 02:37:01 +0000
Subject: delete multiple records with one query
Groups: php.db 
Request: Send a blank email to php-db+get-20250@lists.php.net to get a copy of this message
hi, i'm trying to delete multiple records at once from a mysql db and can't seem to figure out how to do so. here's the code i've been trying to troubleshoot with: $result_insert = mysql_query("delete from $mysql_table where id = '8' AND where id = '18'"); i've tried various things such as taking away the single quotes, replacing AND with a comma, etc. after i figure out how to delete multiple records, i need to figure out how to go about carrying data from checkboxes and finding a query to delete the records that were checked on the previous page: ex. <input type=checkbox name=id value=1> <input type=checkbox name=id value=2> <input type=checkbox name=id value=3> etc. any help would be appreciated. thanks very much, Matt

« previous php.db (#20250) next »