mysql - php variable used as mysqli column name syntax error -


this question has answer here:

this think it´s problem...

$sql1 = "select `puntos_globales`, '$juego'           `lista_jugadores` `id_jugador`='$notop'"; 

this error message:

error:

you have error in sql syntax; check manual corresponds mysql server version right syntax use near "blackops2'='1' `id_jugador` = '10" @ line 1 

$juego .. php variable holds column name; in case blackops2. don´t know why in error says blackops2'='1'??

from error seems didnt provide true query , looks have 2 clause

     blackops2='1' `id_jugador` = '10" 

try that

     `id_jugador` = '10' , blackops2='1' 

Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -