Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mysql_query() not working

Status
Not open for further replies.

theoneweasel77

Programmer
Aug 10, 2004
54
0
0
US
assuming all variables are set and $db is a valid link resource and mysql_error() returns nothing and the table exists with the specified column names, what is wrong with the following statement?
Code:
$piece_update = mysql_query("UPDATE `moves` SET `$move_from` = '$moves[$foo]', `$move_to` = '$moves[$foo2]' WHERE `ID` = '$ID' && `color` = '$color'", $db);
and I've tried this
Code:
$piece_update = mysql_query("UPDATE `moves` SET '$move_from' = '$moves[$foo]', '$move_to' = '$moves[$foo2]' WHERE `ID` = '$ID' && `color` = '$color'", $db);
The data is never entered in the database.
 
nevermind again :). I was looking for help in the mysql forum and as I was explaining that all the variables were set I got to thinking...maybe they're not. Turns out I forgot to pass a session ID in the query string
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top