How to sort the data from the database before outputting it to the TextView Data is output using the adapter
when using "DESC" there is no result for some reason
code example
insert ===========
public long createNote(String title, String body, String date) { ContentValues initialValues = new ContentValues(); initialValues.put(KEY_TITLE, title); initialValues.put(KEY_BODY, body); initialValues.put(KEY_DATE, date); return mDb.insert(DATABASE_TABLE, null, initialValues); }
============= and this extract
<i> String orderBy = "DESC"; return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_TITLE, KEY_BODY,KEY_DATE}, null, null, null, null, orderBy); </i>
But "DESC" for some reason does not sort