【问题标题】:Update Query In Content Provider [closed]更新内容提供者中的查询[关闭]
【发布时间】:2015-09-15 06:52:39
【问题描述】:

我想在查询中使用“abc”DESC 的限制和排序,我没有得到 解决方案

BuyActivity.this
            .getContentResolver()
                          .update(LearnBirdContactClass.LearbirdTable.SUB_CAT_URI_CONTENT_URI,
                                    contentValuessubcat,
                                    LearnBirdContactClass.SubCategortyTableColumns.CAT_ID
                                            + " = ? AND "
                                            + LearnBirdContactClass.SubCategortyTableColumns.SUB_CAT_ID
                                            + " = ?", new String[] { catId, });

如何在此添加限制和订购方式

谢谢

【问题讨论】:

标签: android sql sqlite


【解决方案1】:

Android 中的 SQLite 库没有启用 UPDATE/DELETE LIMIT 子句,所以即使内容提供者有这样一个限制的接口(它没有),它也不会工作。

您别无选择,只能唯一标识要更新的行。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-25
    • 2018-10-11
    • 1970-01-01
    • 2013-05-27
    相关资源
    最近更新 更多