What kind of error are you getting?
Your SQL looks fine to me. I can think of a couple of reasons why this
might not be working; there may be a difference in how the field names are
spelled, or there may not be any rows in usr_stats where the spec column
contains a value of $field.
Hm, you might also try:
delete from usr_stats where sel like '$sel' and spec like '$field'
At 12:35 PM 11/21/2001, 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.
Sliante,
Richard S. Crawford
http://www.mossroot.com
AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford
MSN: [EMAIL PROTECTED]
"It is only with the heart that we see rightly; what is essential is
invisible to the eye." --Antoine de Saint Exup�ry
"Push the button, Max!"
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]