0
我想更新SQLite数据库中特定行中特定列的值。我应该做什么类型的SQLite调用?我可以使用rawQuery()来做到这一点,或者我应该使用更新()方法。这些电话会是什么?我应该为更新SQLite数据库中的值做些什么?
一个我现在是这样的:
ContentValues values = new ContentValues();
values.put("c_uploaded", "true");
String where = new String("WHERE c_created_at = ?");
String[] created = new String[] {"Tuesday"};
db.update("TABLE", values, where , created);
所以我想更新c_uploaded列真正其中c_created列为周二
这是否有意义还是有更好的办法呢?
欣赏帮助。
使用[ORMAN框架](https://github.com/ahmetalpbalkan/orman),这很容易。你只需要改变字段,然后说'yourObject.update()'。 –