Well I am trying to update a value in database false to true;
this is my code
public void updatecheck( int id){
mDb = mDbHelper.getWritableDatabase();
ContentValues newValues = new ContentValues();
newValues.put("check", true);
mDb.update(channel, newValues, "id"+" = ?", new String [] {String.valueOf(id)});
}
But I am taking this error,
02-28 15:15:37.515: E/AndroidRuntime(5539): android.database.sqlite.SQLiteException: near "check": syntax error (code 1): , while compiling: UPDATE Genelkultur2012 SET check=? WHERE id = ?
SOLVED:
new codes
ContentValues newValues = new ContentValues();
newValues.put("tamam", true);
mDb.update(channel, newValues, "id"+" = ?", new String [] {String.valueOf(id)});