public static List<SqlRow> findQuery(int page , int index, String source , String destination , Date date) {
String sql = "select DISTINCT airplane.id,airplane.reg_no,airplane.type,airplane.total_seat,source,destination,depart_date,amount from airplane,routee,flight,fare,airport ,flight_airplane where airplane.id IN (select AIRPLANE_ID from FLIGHT_AIRPLANE where FLIGHT_ID IN (select id from flight where depart_date= :date \n" +
"AND ROUTEE_ID IN (select id from routee where source= :first and destination= :destination and airport_id IN (select id from airport where CITY= :first OR COUNTRY= :first) AND fare_id IN (select id from fare) ))\n" +
") and source= :first and destination= :destination and depart_date= :date order by amount ;";
SqlQuery sqlQuery = Ebean.createSqlQuery(sql);
sqlQuery.setParameter("first",source);
sqlQuery.setParameter("destination",destination);
sqlQuery.setParameter("date",date);
return sqlQuery.findList();
}
这是我写的连接各种表并返回列表的查询。这在我的电脑上很棒,但是如果我在不同的PC /笔记本电脑上试用它总是会返回0结果。让我知道我做错了什么。
由于