Possible Duplicate:
How do i order my SQLITE database in descending order, for an android app?
I've the following table where i'd like to select the contents of the table but order by the C_TAG_SCAN_TIME field DESC.
public static final String C_ID = BaseColumns._ID; // special for id internally in system
public static final String C_TYPE = "type";
public static final String C_COMPANY_ID = "companyid";
public static final String C_PERSON_ID = "person";
public static final String C_NAME = "name";
public static final String C_TAG_ID = "tagid";
public static final String C_STATUS = "status";
public static final String C_TAG_SCAN_TIME = "tagscantime";
public static final String C_TAG_SENTSERVER_TIME = "tagsentservertime";
public static final String C_TRANSACTIONS_LATITUDE = "transactionslatitude";
public static final String C_TRANSACTIONS_LONGITUDE = "transactionslongitude";
.
This is my query to select everything from the table TRANSACTIONS.
return db.query(DBHelper.TABLETRANSACTIONS, null, null, null, null, null, null);
My question is how can i change the query to order descendingly on the C_TAG_SCAN_TIME column?