MySQL Error
SQL statements
$insert = "INSERT INTO forum set name= ' $name ', description= ' $description ', order= ' $order ', open= ' $open '";
Error Reporting
Error:you has an error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use-near ' order= ' 1 ', open= ' 0 "at Li NE 1
There is no problem inserting only the first two fields when inserting a database
Best answer [url=http://www.111cn.cn/bbs/space.php?username= together with Glory] link tag together glory [/url]
[url=http://www.111cn.cn/bbs/space.php?uid=129958] link marker [img]http://www.111cn.cn/server/avatar.php?uid=129958 &size=small[/img][/url]insert into forum set ' name ' = ' Administrator ', ' description ' = ' Satan master ', ' order ' = ' 1 ', ' open ' = ' 1 ';
Look
Order is a keyword
Attachments: The user group you are in cannot download or view attachments
d8888d Huitie Content-------------------------------------------------------
INSERT INTO forum set ' name ' = ' Administrator ', ' description ' = ' Satan master ', ' order ' = ' 1 ', ' open ' = ' 1 ';
Look
Order is a keyword
d8888d Huitie Content-------------------------------------------------------
You put the $insert out and check it out.
d8888d Huitie Content-------------------------------------------------------
INSERT INTO forum set name= ' Administrator ', description= ' Satan Master ', order= ' 1 ', open= ' 1 '
d8888d Huitie Content-------------------------------------------------------
Order= ' 1 ', open= ' 1 ' ERROR is out here
d8888d Huitie Content-------------------------------------------------------
It's really a syntax error: INSERT into table_name
VALUES (value1, value2, Value3,...)
Copy code INSERT INTO table_name (column1, Column2, Column3,...)
VALUES (value1, value2, Value3,...)
Copy Code
d8888d Huitie Content-------------------------------------------------------
I see
d8888d Huitie Content-------------------------------------------------------
What's the problem?
d8888d Huitie Content-------------------------------------------------------
Order is a keyword
d8888d Huitie Content-------------------------------------------------------
[Img]http://www.111cn.cn/bbs/images/smilies/default/dizzy.gif[/img]
http://www.bkjia.com/PHPjc/632557.html www.bkjia.com true http://www.bkjia.com/PHPjc/632557.html techarticle mysql Error SQL statement $insert = "INSERT INTO forum set name= ' $name ', description= ' $description ', order= ' $order ', open= ' $open ' "; Error Reporting error:you has an error in your SQL syntax; ....