I tryed this:
public void updateCharacter(String charName, int level, int stamina)
{
ContentValues args = new ContentValues();
//args.put(KEY_CHAR_NAME, charName);
args.put(KEY_LEVEL, level);
args.put(KEY_STAMINA, stamina);
db.update(CHARACTERS_TABLE, args, KEY_CHAR_NAME + "=" + charName, null);
}
this is my func call:
db.updateCharacter("myPlayer", 2, 2);
Getting this exception:
android.database.sqlite.SQLiteException: no such column: myPlayer: , while compiling: UPDATE characters_table SET level=?, stamina=? WHERE charName=myPlayer
Im 99% sure i got such a column i can print it out, i see it in a layout a definetly got myPlayer in the first column which is KEY_CHAR_NAME (charName), so what is wrong?
Use this