dimanche 29 mars 2015

Android SQLite database delete

I want to delete the all rows by dates. In the table I have the rows with this format:2014-01-01. Now, I want to delete the all rows by date range. I have created this method, but I believe there is a syntax error:



public void deleteAllEntrate_e_uscite(View v) {
SQLiteDatabase db = mHelper.getWritableDatabase();
db.delete(MyTable.TABLE_NAME, MyTable.DATA + "BETWEEN" +dateAndTime+ "AND" +dateAndTime1, null);
db.close();
finish();

}

Aucun commentaire:

Enregistrer un commentaire