I have a SQLite DB with a table called "students". In the students table, there are 2 columns: "student_id" and "student_name".
I am trying to delete a row from an SQLite table using this code:
String TABLE_STUDENTS = "students";
String COLUMN_STUDENTNAME= "student_name";
public void deleteUser(String name) {
database.delete(TABLE_STUDENTS, COLUMN_STUDENTNAME + "=" + name, null);
}
However, when I try to delete the user "John" I get this error message from LogCat
12-19 16:28:47.132: E/SQLiteLog(14883): (1) no such column: John
I was trying to follow the example here: Deleting Row in SQLite in Android, but I could swear my syntax is the same.
Guessing I am doing something stupid, but anyone able to help? Thanks.