String sql = "select s.* from user s where s.id limit ((?-1)*?),?";
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 '((1-1)*1),1' at line 1
String sql = "select s.* from user s where s.id limit ((?-1)*?),?";
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 '((1-1)*1),1' at line 1
limit后面不能用运算符,可以先在程序中计算好在代入到sql语句中