mysql错误
sql语句
$insert="insert into forum set name='$name',description='$description',order='$order',open='$open'";
错误报告
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
在插入数据库时,只插入前两个字段没有问题
最佳答案[url=http://www.111cn.cn/bbs/space.php?username=一起的荣耀]链接标记一起的荣耀[/url]
[url=http://www.111cn.cn/bbs/space.php?uid=129958]链接标记[img]http://www.111cn.cn/server/avatar.php?uid=129958&size=small[/img][/url]insert into forum set `name`='administrator',`description`='撒旦撒大师的',`order`='1',`open`='1';
看看
order 是关键字
附件: 您所在的用户组无法下载或查看附件
D8888D回贴内容-------------------------------------------------------
insert into forum set `name`='administrator',`description`='撒旦撒大师的',`order`='1',`open`='1';
看看
order 是关键字
D8888D回贴内容-------------------------------------------------------
你把$insert 输出一下检查看看
D8888D回贴内容-------------------------------------------------------
insert into forum set name='administrator',description='撒旦撒大师的',order='1',open='1'
D8888D回贴内容-------------------------------------------------------
order='1',open='1'错误就出在这儿
D8888D回贴内容-------------------------------------------------------
还真的是语法错误: INSERT INTO table_name
VALUES (value1, value2, value3,...)
INSERT INTO table_name (column1, column2, column3,...)
VALUES (value1, value2, value3,...)
D8888D回贴内容-------------------------------------------------------
明白了
D8888D回贴内容-------------------------------------------------------
是啥问题呀说下子...
D8888D回贴内容-------------------------------------------------------
order 是关键字
D8888D回贴内容-------------------------------------------------------
[img]http://www.111cn.cn/bbs/images/smilies/default/dizzy.gif[/img]
http://www.bkjia.com/PHPjc/632557.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/632557.htmlTechArticlemysql错误 sql语句 $insert="insert into forum set name='$name',description='$description',order='$order',open='$open'"; 错误报告 Error: You have an error in your SQL syntax;...