Deleting from MySQL with more than one 'where' variable?

From: Date: Wed, 21 Nov 2001 20:35:45 +0000
Subject: Deleting from MySQL with more than one 'where' variable?
Groups: php.general 
Request: Send a blank email to php-general+get-75442@lists.php.net to get a copy of this message
Ok, there's a table with 4 fields, I want to delete from it when two of the variables passed (through the function below) match up with the table's contents. However, I have only been able to get it to work with one 'where' clause, not two. Here's my code for one: function delete_one_sub($sel, $field, $update) { $query = "delete from usr_stats where sel='$sel'"; $result = mysql_db_query("f6", $query); } This was code for two variables: function delete_one_sub($sel, $field, $update) { $query = "delete from usr_stats where sel='$sel' and spec='$field'"; $result = mysql_db_query("f6", $query); } However, that doesn't work. Help? Thanks. _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

« previous php.general (#75442) next »