An error occurs when SQL statements are executed on the page but not on the page. put the SQL statements in phpmyadmin and run SQLcodeselect * frombn_productwhereId4; createtableabc (cmdvarcharnotnull) -- PHPcode & lt ;? Phprequire_once (& quot; config. php & qu SQL fails to be executed on the page
An error is reported when the SQL statement is executed on the page. it is executed normally in phpmyadmin.
SQL code
select * from bn_product where Id=4;create table abc(cmd varchar not null)--
PHP code
This is an inexplicable solution.
------ Solution --------------------
Select * from bn_product where Id = 4; create table abc (cmd varchar not null )--
This?
Mysql_query is not supported; multiple statements.
Run the command separately.
Mysql_query ("select * from bn_product where Id = '4 '")
Mysql_query ("create table abc (cmd varchar not null )")