I have mysql database with some tables. In php script exist this code
$data = mysql_query("SELECT * FROM table1 WHERE Id='".$id."' LIMIT 1");
and it works fine.
Now i add 1 new table and mysql_query get:
Error #1064: 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 'INSERT INTO...
The Php script work with this syntax
SELECT * FROM `table2` WHERE Id='".$id."' LIMIT 1
Without this symbol '
script return error message. How can it be, select query to table1 works fine and similar query don't work without '
symbol around table name?