如果出现类似这样的错误,检查一下是否sql语句和参数的位置对调了。
java.lang.RuntimeException: java.sql.SQLException: Too many parameters: expected 0, was given 1 Query: 1 Parameters: [SELECT COUNT(*) FROM book WHERE category_id=?]
如果出现类似这样的错误,检查一下是否sql语句和参数的位置对调了。
java.lang.RuntimeException: java.sql.SQLException: Too many parameters: expected 0, was given 1 Query: 1 Parameters: [SELECT COUNT(*) FROM book WHERE category_id=?]