String sql="select * from order where user_id = ? ORDER BY order_id DESC LIMIT ?,?";
searchInfo(user):com.mysql.jdbc.PreparedStatement@160c4b0:select*fromorderwhereuser_i...
searchInfo(user):com.mysql.jdbc.PreparedStatement@160c4b0: select * from order where user_id = 1 ORDER BY order_id DESC LIMIT 0,10
java.sql.SQLException: 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 'order where user_id = 1 ORDER BY order_id DESC LIMIT 0,10' at line 1
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2926)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2978)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2902)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:933)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1027)
at cn.edu.lcdc.logistics.bean.OrderBeanImpl.InfoSearch(OrderBeanImpl.java:228)
at cn.edu.lcdc.logistics.android.servlet.ServerAgent.run(ServerAgent.java:1384)
到底是哪的错误呀。。。急!!! 展开
java.sql.SQLException: 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 'order where user_id = 1 ORDER BY order_id DESC LIMIT 0,10' at line 1
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2926)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2978)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2902)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:933)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1027)
at cn.edu.lcdc.logistics.bean.OrderBeanImpl.InfoSearch(OrderBeanImpl.java:228)
at cn.edu.lcdc.logistics.android.servlet.ServerAgent.run(ServerAgent.java:1384)
到底是哪的错误呀。。。急!!! 展开
3个回答
展开全部
check the manual that corresponds to your MySQL server version for the right syntax to use near 'order where。。。。。。
已经说的很清楚了,是order关键字的问题,
已经说的很清楚了,是order关键字的问题,
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
E看错了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询