ho questo script per aggiornare un database mysql
Codice PHP:
$query = "UPDATE orario2A SET
LUNEDI=$lunedi,
MARTEDI=$martedi,
MERCOLEDI=$mercoledi,
GIOVEDI=$giovedi,
VENERDI=$venerdi,
SABATO=$sabato,
WHERE ORA=$id ;";
$result = mysql_query($query);
if (!$result) {
die("errore nella query" .mysql_error());
}
echo "Query eseguita correttamente !!!!!";
però mi esce questo errore
Codice PHP:
errore nella queryYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Sposi, MARTEDI=Fisica, MERCOLEDI=Matematica, GIOVEDI=Chimica, VENERDI=Promes' at line 2
però non so come risolvere
mi date una mano ?
Grazie