bad query with php? errer ensues

This is my query

mysql_query($con,"UPDATE my_table SET `$cat`='0' WHERE username='$user' AND password='$pass' AND foot='$food'");

I get this:

Warning: mysql_query() expects parameter 1 to be string, resource given in file.php on line 42

i know that all of my variables are defined, what seems to be the issue?

i meant error in the topic… just typing too fast.

Always start with the manual: http://php.net/mysql_query

resource mysql_query ( string $query [, resource $link_identifier = NULL ] )

Sponsor our Newsletter | Privacy Policy | Terms of Service