preparedStatement = connection.prepareStatement("select fname,lname, "
+ "sportman_code,start,finish,salary,amount,number,pnumber "
+ "from sportman,customer "
+ "where customer.customer_code = "
+ "sportman.customer_code order by ? limit ?,?");
preparedStatement.setString(1, "fname");
preparedStatement.setInt(2, 0);
preparedStatement.setInt(3, 9);
resultSet = preparedStatement.executeQuery();
排序方式没有奏效。 为什么?准备声明的问题
当我把fname改为?它工作正常。
"sportman.customer_code order by fname limit ?,?");
我该怎么做?
+1为M&M图像。 – 2011-04-22 21:22:17