2 xboyjimmy xboyjimmy 于 2016.02.23 10:51 提问

SSH下WEB项目,insert时报如下错误,求大神解答

Http status: 200 OK
ajaxOptions: parsererror
thrownError: SyntaxError: Unexpected token <
Struts Problem Report
Struts has detected an unhandled exception:

Messages:

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 'describe, isDel, addTime) values (1, 'å??称', 'æ??è¿°', 0, '2016-02-23 10:45:20' at line 1
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 'describe, isDel, addTime) values (1, 'å??称', 'æ??è¿°', 0, '2016-02-23 10:45:20' at line 1
File: org/hibernate/exception/internal/SQLExceptionTypeDelegate.java
Line number: 82
Stacktraces
org.hibernate.exception.SQLGrammarException: 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 'describe, isDel, addTime) values (1, 'å??称', 'æ??è¿°', 0, '2016-02-23 10:45:20' at line 1

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'describe, isDel, addTime) values (1, 'å??称', 'æ??è¿°', 0, '2016-02-23 10:45:20' at line 1

1个回答

rui888
rui888   Ds   Rxr 2016.02.23 11:09
已采纳

语法错误,还有你上面那个是乱码吗? 'describe, isDel, addTime) values (1, 'å??称', 'æ??è¿°', 0, '2016-02-23 10:45:20

建议将sql语句拷贝出来放到你的 sql 环境中再测试看看,

xboyjimmy
xboyjimmy 已解决,原因是describe是关键字
接近 2 年之前 回复
xboyjimmy
xboyjimmy 控制台打印如下:Hibernate: insert into api.module (projectId, name, describe, isDel, addTime) values (?, ?, ?, ?, ?),SQL中如下:insert into module (projectId, name, describe, isDel, addTime) values (1, '测试', '测试', 0, 2015-11-11),报错1064错误,求解
接近 2 年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!