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()'。 –