StringsqlAllCount="select count(0) as 'allCount' from order_tickets where performance_id > 5721 and status != 2 and status != -1 and created_at like '2021-"+month+"%'";//设置的预编译语句格式
StringsqlAllCount="select count(0) as 'allCount' from order_tickets where performance_id > 5721 and status != 2 and status != -1 and created_at like '2021-"+month+"%'";//设置的预编译语句格式
// String sqlAllCount = "select count(0) as 'allCount' from order_tickets where performance_id = "+month + " and status != 2 and status !=-1"; //设置的预编译语句格式
// String sqlAllCount = "select count(0) as 'allCount' from order_tickets where performance_id = "+month + " and status != 2 and status !=-1"; //设置的预编译语句格式
System.out.println(" SQL COUNT = "+sqlAllCount);
pstmt=con.prepareStatement(sqlAllCount);
pstmt=con.prepareStatement(sqlAllCount);
ResultSetallCount=pstmt.executeQuery();
ResultSetallCount=pstmt.executeQuery();
intallCountResult=0;//共多少条
intallCountResult=0;//共多少条
...
@@ -482,7 +481,6 @@ public class DataImpl {
...
@@ -482,7 +481,6 @@ public class DataImpl {
//订单
//订单
Stringsql="select * from order_tickets where performance_id > 5721 and status != 2 and status != -1 and created_at like '2021-"+month+"%' limit "+count*page+" ,"+count;//设置的预编译语句格式
Stringsql="select * from order_tickets where performance_id > 5721 and status != 2 and status != -1 and created_at like '2021-"+month+"%' limit "+count*page+" ,"+count;//设置的预编译语句格式
// String sql = "select * from order_tickets where performance_id = "+month +" and status != 2 limit " + count * page + " ," + count;
// String sql = "select * from order_tickets where performance_id = "+month +" and status != 2 limit " + count * page + " ," + count;