gpt4 book ai didi

android sqlite 如何按时间排序

转载 作者:太空宇宙 更新时间:2023-11-03 12:10:20 25 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
How do i order my SQLITE database in descending order, for an android app?

我有下表,我想在其中选择表的内容,但按 C_TAG_SCAN_TIME 字段 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";

.

这是我从 TRANSACTIONS 表中选择所有内容的查询。

return db.query(DBHelper.TABLETRANSACTIONS, null, null, null, null, null, null);

我的问题是如何将查询更改为按 C_TAG_SCAN_TIME 列降序排列?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com