SQL [select count(*) from user where 1=1]; Parameter index out of range (1 > number of parameters, w
于 2022-04-06 17:49:49 首次发布
这篇博客讨论了在多条件查询时,UserDaoImpl的findTotalCount方法中出现的错误。问题在于尝试直接使用StringBuilder对象作为查询参数,而正确的做法是将其转换为String类型后再传递。修复此错误的方法是将sb.toString()转换为Integer类,从而确保数据库查询的正确执行。




2292

被折叠的 条评论
为什么被折叠?



