Re: Deleting from MySQL with more than one 'where' variable?
| From: | Mike Eheler | Date: | Wed, 21 Nov 2001 23:07:27 +0000 |
| Subject: | Re: Deleting from MySQL with more than one 'where' variable? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-75456@lists.php.net to get a copy of this message | ||
Are you getting an error, or is it simply not deleting the fields that should match that criteria?
Mike
cosmin laslau wrote:
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