兑换记录500错误
来源:15-16 前端展示系统补强之奖品兑换记录列表页的开发
qq_STUDY_HJZ
2018-12-26
### Error querying database. Cause: 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 'operator.name AS operator_name
FROM
tb_user_award_map
uam,
tb_person_in' at line 13
### The error may exist in file [D:\Eclipse\spring-tool-suite-3.9.6.RELEASE-e4.9.0-win32-x86_64\o2o\target\classes\mapper\UserAwardMapDao.xml]
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: SELECT uam.user_award_id, uam.create_time, uam.used_status, uam.point, buyer.user_id, buyer.name, s.shop_id, s.shop_name, a.award_id, a.award_name, operator.user_id AS operator_id operator.name AS operator_name FROM tb_user_award_map uam, tb_person_info buyer, tb_shop s, tb_award a tb_person_info operator WHERE uam.user_id = buyer.user_id and uam.shop_id = s.shop_id and uam.award_id = a.award_id and uam.operator_id=operator.user_id and uam.user_id = ? and buyer.name like '%黄嘉州%' ORDER BY uam.create_time desc LIMIT ?,?;
### Cause: 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 'operator.name AS operator_name
FROM
tb_user_award_map
uam,
tb_person_in' at line 13
; bad SQL grammar []; nested exception is 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 'operator.name AS operator_name
FROM
tb_user_award_map
uam,
tb_person_in' at line 13] with root cause
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 'operator.name AS operator_name
FROM
tb_user_award_map
uam,
tb_person_in' at line
2回答
-
翔仔
2018-12-27
同学好,错误比较明显,希望同学以后遇到此类问题能配合控制台去解决,报得很明确,说你sql语法错误
SELECT uam.user_award_id, uam.create_time, uam.used_status, uam.point, buyer.user_id, buyer.name, s.shop_id, s.shop_name, a.award_id, a.award_name, operator.user_id AS operator_id operator.name AS operator_name FROM tb_user_award_map uam, tb_person_info buyer, tb_shop s, tb_award a tb_person_info operator WHERE uam.user_id = buyer.user_id and uam.shop_id = s.shop_id and uam.award_id = a.award_id and uam.operator_id=operator.user_id and uam.user_id = ? and buyer.name like '%黄嘉州%' ORDER BY uam.create_time desc LIMIT ?,?;
right syntax to use near 'operator.name AS operator_name
operator.user_id AS operator_id operator.name AS operator_name
这里是不是少了一个逗号?
00 -
qq_STUDY_HJZ
提问者
2018-12-26
500错误如下
00