作者:我_纯情至上 | 来源:互联网 | 2023-05-17 21:29
publicCursorfetchTimetable(){returnmDb.query(DATABASE_TABLE_TIMETABLE,newString[]{TIMETA
public Cursor fetchTimetable() {
return mDb.query(DATABASE_TABLE_TIMETABLE, new String[] {TIMETABLE_ROWID, TIMETABLE_MODULECODE, TIMETABLE_MODULENAME, TIMETABLE_ROOM, TIMETABLE_LECTURER, TIMETABLE_TIME}, null, null, null, null, null);
}
For example if i wanted TIMETABLE_MODULECODE = 123. How would i do this, i have read its the first null. I have tried this below but still doesnt work
例如,如果我想要TIMETABLE_MODULECODE = 123.我将如何做到这一点,我已经读过它的第一个null。我在下面尝试了这个,但仍然无法正常工作
public Cursor fetchTimetable() {
String a = "TIMETABLE_CODE = ADD";
return mDb.query(DATABASE_TABLE_TIMETABLE, new String[] {TIMETABLE_ROWID, TIMETABLE_MODULECODE, TIMETABLE_MODULENAME, TIMETABLE_ROOM, TIMETABLE_LECTURER, TIMETABLE_TIME}, a, null, null, null, null);
}
7 个解决方案