theoneweasel77
Programmer
I can't find a probem in the following mysql_query, though it is working fine. All the variables are set and contain correct data but the table is not being altered.
The column names are actually
where $i is an autoincremented number (this is in a for() loop) The only thing I can think of is that you can't use variables to set column names. is this true? is there a way around that? mysql_error() prints nothing.
Code:
mysql_query("UPDATE `moves` SET `$move_from` = '$moves[$foo]', `$move_to` = '$moves[$foo2]' WHERE `ID` = '$ID' && `color` = '$color'", $db);
Code:
$move_from = "move".$i."from";
$move_to = "move".$i."to";