具有多个条件的SQLITE更新命令不起作用

时间:2017-03-29 14:53:24

标签: android sqlite android-sqlite

更新命令不适用于多种情况。

public int updateDayCycle(DailyView dailyView, String date, String time) {
        SQLiteDatabase db = this.getWritableDatabase();
        ContentValues values = new ContentValues();
        values.put(KEY_ACTIVITY, dailyView.getActivity());
        Log.i("KEY_ACTIVITY", dailyView.getActivity());
        Log.i("DATETIME",date+" "+time);
        return db.update(TABLE_DAY_CYCLE_DETAILS, values, KEY_DATE + " = ? AND " +
                KEY_TIMING + " = ?", new String[]{date, time});
    }

0 个答案:

没有答案