Waarom werkt deze query niet?:
Codeblok (voorbeeld.php):
1
mysql_query(UPDATE `list` SET `rating` = . $gemiddelde . WHERE `id` = . $id . ) or die(mysql_error());
Ik krijg deze error:
Quote:
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 WHERE `id` = 3 at line 1
$id = $_GET[id];
$gemiddelde = $beoordeeling_totaal / totaal;
Codeblok (voorbeeld.php):
1
mysql_query(UPDATE `list` SET `rating` = . $gemiddelde . WHERE `id` = . $id . ) or die(mysql_error());
Ik krijg deze error:
Quote:
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 WHERE `id` = 3 at line 1
$id = $_GET[id];
$gemiddelde = $beoordeeling_totaal / totaal;