我正在我的数据库助手类中执行更新方法。但我无法解决我在哪里做错了。日志中没有错误,但我在表中的字段没有更新。
public void updateJSON(long id, String newString) {
ContentValues dataToInsert = new ContentValues();
dataToInsert.put("cityJSON", newString);
String where = "id=?";
String[] whereArgs = new String[]{String.valueOf(id)};
this.db.update(TABLE_NAME, dataToInsert, where, whereArgs);
}
我正在传输 json 字符串(带有逗号、括号等)和字段的 ID。