SQLiteDatabase - How to use where clause?

前端 未结 7 759
情歌与酒
情歌与酒 2021-02-09 02:57
public Cursor fetchTimetable() {
    return mDb.query(DATABASE_TABLE_TIMETABLE, new String[] {TIMETABLE_ROWID,    TIMETABLE_MODULECODE, TIMETABLE_MODULENAME, TIMETABLE_R         


        
7条回答
  •  礼貌的吻别
    2021-02-09 03:08

    the right syntax is

    String[] projection= {column names};
    String[] where={"values for where clause"}; //this must be array     
    public Cursor fetchTimetable() { 
    
        return mDb.query(TABLE_NAME, projrction, "columname"+"=?", where, null, null, null); 
    } 
    

提交回复
热议问题