
论坛发帖出现Discuz! info: MySQL Query Error这样的问题
论坛发帖出现如下:Discuz!info:MySQLQueryErrorUser:lubeibeiaijay@163.comTime:2012-6-194:09amScr...
论坛发帖出现如下:
Discuz! info: MySQL Query Error
User: lubeibeiaijay@163.com
Time: 2012-6-19 4:09am
Script: /forum/post.php
SQL: INSERT INTO [Table]threads (fid, readperm, price, iconid, typeid, sortid, author, authorid, subject, dateline, lastpost, lastposter, displayorder, digest, special, attachment, moderated, status)
VALUES ('17', '0', '0', '0', '0', '', 'La'Mour 璨�', '29411', '浣犲惉闄埚杩呯殑绗竴棣栨瓕鏄粈涔堬紵', '1340078992', '1340078992', 'La'Mour 璨�', '0', '0', '0', '0', '0', '0')
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 'Mour 璨�', '29411', '浣犲惉闄埚杩呯殑绗竴棣栨瓕鏄粈涔堬紵', '1340078992',' at line 2
Errno.: 1064
Similar error report has been dispatched to administrator before.
是我电脑的问题,还是他们论坛数据库的问题? 展开
Discuz! info: MySQL Query Error
User: lubeibeiaijay@163.com
Time: 2012-6-19 4:09am
Script: /forum/post.php
SQL: INSERT INTO [Table]threads (fid, readperm, price, iconid, typeid, sortid, author, authorid, subject, dateline, lastpost, lastposter, displayorder, digest, special, attachment, moderated, status)
VALUES ('17', '0', '0', '0', '0', '', 'La'Mour 璨�', '29411', '浣犲惉闄埚杩呯殑绗竴棣栨瓕鏄粈涔堬紵', '1340078992', '1340078992', 'La'Mour 璨�', '0', '0', '0', '0', '0', '0')
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 'Mour 璨�', '29411', '浣犲惉闄埚杩呯殑绗竴棣栨瓕鏄粈涔堬紵', '1340078992',' at line 2
Errno.: 1064
Similar error report has been dispatched to administrator before.
是我电脑的问题,还是他们论坛数据库的问题? 展开
1个回答
展开全部
SQL出错了。后台代码的问题。
你可以看到 插入数据库的SQL语句中,各字段都是用单引号括起来的。但是现在在一些值内部又出现了单引号,两者之间出现了混淆。
正常情况下,如果用单引号括起各值,代码就应该对值内部出现的单引号做转义处理,显然这里是代码问题。
满意请采纳!
你可以看到 插入数据库的SQL语句中,各字段都是用单引号括起来的。但是现在在一些值内部又出现了单引号,两者之间出现了混淆。
正常情况下,如果用单引号括起各值,代码就应该对值内部出现的单引号做转义处理,显然这里是代码问题。
满意请采纳!
追问
不是很明白 对这个一无所知 不是我电脑的问题吧?
追答
对,和你电脑没关系。是论坛本身代码有些问题。
满意请采纳,呵呵。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询