Mysql error. Mysql Error SQL statement $ insertinsertintoforumsetname $ name, description $ description, order $ order, open $ open; Error report: YouhaveanerrorinyourSQLsyntax; mysql Error
SQL statement
$ Insert = "insert into forum set name = '$ name', description =' $ description', order = '$ order', open =' $ open '";
Error Report
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 'Order = '1 ', open = '0' at line 1
When inserting a database, only the first two fields are inserted.
Best answer [url = http://www.111cn.cn/bbs/space.php? Username = glory together] Glory marked together by links [/url]
[Url = http://www.111cn.cn/bbs/space.php? Uid = 129958] link tag [img] http://www.111cn.cn/server/avatar.php? Uid = 129958 & size = small [/img] [/url] insert into forum set 'name' = 'admin', 'description' = 'Satan's master ', 'order' = '1', 'open' = '1 ';
Look
Order is the keyword
Attachment: you cannot download or view attachments in your user group.
D8888D reply content -------------------------------------------------------
Insert into forum set 'name' = 'admin', 'description' = 'Satan's master', 'order' = '1', 'open' = '1 ';
Look
Order is the keyword
D8888D reply content -------------------------------------------------------
Check the $ insert output.
D8888D reply content -------------------------------------------------------
Insert into forum set name = 'admin', description = 'Satan's master', order = '1', open = '1'
D8888D reply content -------------------------------------------------------
Order = '1', open = '1' error is here
D8888D reply content -------------------------------------------------------
It is also a syntax error: insert into table_name
VALUES (value1, value2, value3 ,...)
Insert into table_name (column1, column2, column3 ,...)
VALUES (value1, value2, value3 ,...)
D8888D reply content -------------------------------------------------------
Understand
D8888D reply content -------------------------------------------------------
What's the problem? let's talk about it...
D8888D reply content -------------------------------------------------------
Order is the keyword
D8888D reply content -------------------------------------------------------
[Img] http://www.111cn.cn/bbs/images/smilies/default/dizzy.gif#/img]
Explain SQL statement $ insert = "insert into forum set name = '$ name', description =' $ description', order = '$ order', open =' $ open '"; error Report: You have an error in your SQL syntax ;...