I have this code that supposedly deletes from the dataBase the date that I put in the method. But this is not erasing from the dataBase and I do not understand why. Here is the information:
public void deleteRowWhitDate(String date){
String query = "DELETE FROM " + TABLE_NAME+ " WHERE "+ COL_4 + " = " + date ;
database.execSQL(query);
}
I'm sure the dataBase contains the date that I put in date.
public static final String TABLE_NAME = "Exames_table";
public static final String COL_4 = "DIA";
Doing the
Log.d("debug",query);
I got:
DELETE FROM Exames_table WHERE DAY = 07-30-2017