I try to user the following code to display my list in a descending order order by KEY_TIME, but it doesn't work, I tried rawQuery as well, but the program dead after I run it, please help me find the mistake, thanks!
return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_TITLE,
KEY_BODY, KEY_TIME, KEY_CATEGORY, KEY_ALARM}, null, null,null,KEY_TIME+"DESC",null);
Try this code,
return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_TITLE,
KEY_BODY, KEY_TIME, KEY_CATEGORY, KEY_ALARM}, null, null,null,null,KEY_TIME+" DESC");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With