PHP fails to execute the SQL statement, but the current problem that the same statement can be executed in MYSQL is that some tables in the same database can be queried, and some tables cannot be queried. However, these statements can be normally executed in mysql ------ solution ------------------ check in one case, LZ can be combined into an SQL statement on the PHP side & nbsp; output the generated SQL statement to see & nbsp; check if the data fails to execute the SQL statement in the background PHP, but the same statement can be executed in MYSQL
The problem is that some tables in the same database can be queried, and some tables cannot be queried. However, these statements can be executed normally in mysql.
------ Solution --------------------
In one case and one case, LZ can combine the SQL statements in PHP and output the generated SQL statements to check whether the data is properly encoded in the background.
------ Solution --------------------
Can the same SQL statement be directly inserted in the database?
Check the SQL statements written in PHP.
------ Solution --------------------
Directly echo to see what the output is.
------ Solution --------------------
If the permission is okay, it must be because your SQL has a problem.
Print the final SQL statement to be executed
------ Solution --------------------
Mysql_query ($ SQL) or die (mysql_error ());