com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: you have a error in your SQL syntax; check the manual that corresponds to your Mysql server version
foe the right syntax to use near '-30' at line 1
这是什么意思,我把数据库里面的字段名检查过了 没有写错。 请大神们指导!!!
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: you have a error in your SQL syntax; check the manual that corresponds to your Mysql server version
foe the right syntax to use near '-30' at line 1
这是什么意思,我把数据库里面的字段名检查过了 没有写错。 请大神们指导!!!
SQL语句有错啊,执行的是什么语句贴出来
看你的代码:
ps=conn.prepareStatement("select ip,program,type,datetime,content from programLog where ip=? and program=? and datetime>=? and datetime<=? and type=? ORDER BY datetime DESC limit "+size+" offset "+(pageNo-1)*size);
size 和 (pageNo-1)*size 是否是负数??
这里要保证不能是负数!