This is how the table and row look like :
public static final String DATABASE_CREATE = "CREATE TABLE " + TABLE_NAME +
"(" + COLUMN_ID + " integer primary key autoincrement, " + COLUMN_INSTANT +
" TINYINT not null, " + COLUMN_CHANCE + " int not null);";
public static final String TABLE_INSERT = "INSERT INTO " + TABLE_NAME + " (" +
COLUMN_ID+"," + COLUMN_INSTANT +","+ COLUMN_CHANCE
+") VALUES (" +
"1," + "0," + "10"
+");";
And this is how I try to update them :
try {
open();
ContentValues values = new ContentValues();
values.put(column_name, value);
database.beginTransaction();
database.update(MySQLiteHelper.TABLE_NAME, values, MySQLiteHelper.COLUMN_ID + " = " + whereClause,null);
database.setTransactionSuccessful();
} catch (SQLException e) {
e.printStackTrace();
} finally {
database.endTransaction();
}
close();
The previous code would be equal to this query :
UPDATE options SET instant = 0 WHERE _id = 1
But the change is never applied. I check the table before and after the update but the values are the same, can anyone suggest anything?