hi leutz,
ich hab grad ein prob mit ner mysql query. sie sieht wie folgt aus:
da kommt jez die fehlermeldung "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' SET `wood` = '5000'-100 WHERE `id` = '6', SET `stone` = '5000'-500 WHERE ' at line 2". was ist dadran falsch?? und wie oft soll ich WHERE machen. reicht das, wenn das einmal am ende steht??
ich hab grad ein prob mit ner mysql query. sie sieht wie folgt aus:
PHP:
mysql_query("UPDATE `users`
SET `money` = '".mysql_real_escape_string($row["money"]). "'-300 WHERE `id` = '".mysql_real_escape_string($_SESSION["userid"]). "',
SET `wood` = '".mysql_real_escape_string($row["wood"]). "'-100 WHERE `id` = '".mysql_real_escape_string($_SESSION["userid"]). "',
SET `stone` = '".mysql_real_escape_string($row["stone"]). "'-500 WHERE `id` = '".mysql_real_escape_string($_SESSION["userid"]). "',
SET `iron` = '".mysql_real_escape_string($row["iron"]). "'-200 WHERE `id` = '".mysql_real_escape_string($_SESSION["userid"]). "'
") or die(mysql_error());
da kommt jez die fehlermeldung "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' SET `wood` = '5000'-100 WHERE `id` = '6', SET `stone` = '5000'-500 WHERE ' at line 2". was ist dadran falsch?? und wie oft soll ich WHERE machen. reicht das, wenn das einmal am ende steht??