data type mismatch error when using ORDER BY

后端 未结 5 2030
天涯浪人
天涯浪人 2021-02-05 02:19

I\'ve got an android app using a local sqlite database.

private SQLiteDatabase mDb;

when I run this query I get my Cursor over rows with pid eq

5条回答
  •  遇见更好的自我
    2021-02-05 02:50

    Since Orderby is the second last parameter in the query; your query would be like this

    mDb.query(true, PT_TABLE, new String[] {KEY_PID, KEY_TID}, 
        KEY_PID+" = "+id, null, null, null, KEY_PID+" DESC", null);
    

提交回复
热议问题