La variabile in una colonna
Ciao, io volevo per modificare dei dati in un database usare la seguente sintassi per far sì che visto che bisogna cambiare il dato in una specifica colonna che però è variabile fare così:
Codice PHP:
$up99 = "UPDATE user_inventario2 SET " .
" '$$inv' = '$ni' " .
"WHERE nome = '$user' ";
ma come non detto mi fa il tipico errore:
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 ''a' = '' WHERE nome = 'tester17'' at line 1
Sono io che sbaglio modo voi sapete come fare?