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

ruby on rails - Is it the correct way to implement belongs_to relation with factory girl? -

geolocation - Windows Phone 8 - Keeping background location tracking active beyond four hours -

Uncaught TypeError: Cannot read property 'parentNode' of null javascript -