data type mismatch error when using ORDER BY

后端 未结 5 2018
天涯浪人
天涯浪人 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:40

    This worked for me

    String filter = MySQLiteHelper.JOB_ID + "=" + Integer.toString(jobID);
    String orderBy =  MySQLiteHelper.LOG_TIME + " DESC";
    Cursor cursor = database.query(MySQLiteHelper.LOG_TABLE_NAME, logTableColumns,
            filter, null, null, null, orderBy);
    

提交回复
热议问题