I am trying to delete a few rows from my SQLite database like this:
dbUtilsObj.delete(EngineUtiReport.TABLE_NAME,
EngineUtiReport.Columns.KEY_ENGINE_UTI_UNIX_TIME + DBUtils.IS_LESS_THAN,
new String[] { String.valueOf(nDaysOldUnixTime) });
In the above code nDayOldTimeInMills = 1429963811949
and DBUtils.IS_LESS_THAN = " < "
.
But I am getting this syntax error exception and I just can't figure out what I am doing wrong:
android.database.sqlite.SQLiteException: near "<": syntax error (code 1): ,
while compiling: DELETE FROM engine_utilization_report WHERE unix_time <
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1113)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:686)
Aucun commentaire:
Enregistrer un commentaire