//定义四个用户变量
int pageSize = 3; //每页显示的数据数量
int pageNow =1; //当前显示的页号
int rowCount =0; //该值从数据库查询
int pageCount =0; //该值通过pageSize和rowCount计算 //查询出需要显示的记录
rs = sm.executeQuery("select * from users limit"+ pageSize*(pageNow - 1) + "," + pageCount);访问时总是显示错误
javax.servlet.ServletException: 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 '3' at line 1请各位指教,谢谢
int pageSize = 3; //每页显示的数据数量
int pageNow =1; //当前显示的页号
int rowCount =0; //该值从数据库查询
int pageCount =0; //该值通过pageSize和rowCount计算 //查询出需要显示的记录
rs = sm.executeQuery("select * from users limit"+ pageSize*(pageNow - 1) + "," + pageCount);访问时总是显示错误
javax.servlet.ServletException: 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 '3' at line 1请各位指教,谢谢
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货