public Cursor getAcceptedTasks(String empID){
return database.rawQuery("select * from Assignments left join Tasks on Tasks._id = Assignments.TaskID left join Flights on Flights.ARR_FLT_ID = Tasks.ArrivalFlightID where Assignments.TaskAccepted='Y' and Assignments.AssignedTo=?", new String[]{ String.valueOf(empID) });
}
这很完美。如果我提到列名而不是*,则会失败。我究竟做错了什么?
public Cursor getAcceptedTasks(String empID){
return database.rawQuery("select Tasks.Aircraft, Tasks.Discrepancy, Flights.ARR_FLT from Assignments left join Tasks on Tasks._id = Assignments.TaskID left join Flights on Flights.ARR_FLT_ID = Tasks.ArrivalFlightID where Assignments.TaskAccepted='Y' and Assignments.AssignedTo=?", new String[]{ String.valueOf(empID) });
}