The table contains 4 columns : rowID , word , defintition , group_id
I want to change a certain row's word and definition . So here is my code (word is an object where the word , definition , id and the group_id are stored)
ContentValues values = new ContentValues();
values.put(KEY_WORD, word.getWord());
values.put(KEY_DEFINITION, word.getDefinition());
db.update(TABLE_WORDS, values, KEY_ID, new String [] {String.valueOf(word.getID())});
Can anyone tell me why it only creates a new line instead of changing the row under given ID ?