Mybits SQL语句报错

wangsufu77 2016-03-28 09:36:17
SQL:

<select id="getCount" resultType="int" parameterType="map">
select count(*) from tb_item where 1=1 LIMIT #{start} , #{pageSize}
</select>

报错
The error occurred while setting parameters
### SQL: select count(*) from tb_item 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 'null , null' at line 1
; 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 'null , null' at line 1] with root cause
...全文
171 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
wzwdev1980 2016-04-01
  • 打赏
  • 举报
回复
在数据库中执行调试出来的语句,然后根据问题进行对应修改
wangsufu77 2016-03-28
  • 打赏
  • 举报
回复
count 语句不要limit,我擦

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧