trying to delete null rows with an Id
I am working in android with five rows in my table; _id, title, type, platform, body. I have some rows that have null Columns, the _id is an auto increment field so it will never be nu开发者_如何学Cll.
The problem I am having is that I cannot delete the rows that have been created that have null values, except for the _id.
Here is what have tried: public boolean deleteBlankRecord(long rowId) {
return mDb.delete(DATABASE.TABLE,KEY_TITLE + "=" + title, null) > 0;
Can any one suggest something else?
I think your miss understanding how the delete function works. try using the _id to delete the rows.
return mDb.delete(DATABASE.TABLE,KEY_ID + "=" + rowId, null) > 0;
精彩评论