This question already has an answer here:
This is where I think it´s the problem...
$sql1 = "SELECT `puntos_globales`, '$juego'
FROM `lista_jugadores` WHERE `id_jugador`='$noTop'";
This is the error message:
Error:
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 "blackOps2'='1' WHERE `id_jugador` = '10" at line 1
$juego .. is a php variable that holds the column name; in this case blackOps2. I don´t know why in the error says blackOps2'='1'??
'
turns things into a strings and removes any "significance" they might have to the database.foo
would be a field/table name,'foo'
is just a string that contains the wordfoo
. – Marc B Aug 23 '13 at 15:45