I display data from a query on my database in a ListView. My question is: Can I order my data from the query, then store this ordered data in my cursor object? Or do I have to order the ListView?
i.e can I order the data by name in the following query?
Cursor c = ourDatabase.query(DATABASE_TABLE, columns, KEY_ROWID + "=" + passId, null, null, null, null);
Last parameter in your query represents order by
Example: