I have one table:
CREATE TABLE People
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name
);
I wanted to delete some rows from the table by using its id as condition. So I tried to use this one but it was not working at all. So have a look:
//idd is int
SQLiteDatabase.delete
(
"People",
"id" + " = ?",
new String[]{String.valueOf(idd)}
);
I dont know why it not working. It may because the String and int datatype. I figure it out something and it may work. But it use only two parameters instead of three. And I want to use three instead. So below is what I have figured out:
SQLiteDatabase.delete
(
"People",
"id" + " = ?" + idd,
null
);
So does anyone have any idea and help me out of this problem? I want to delete some rows from my table by using id as whereClause(second parameter) and idd variable which is integer as whereArg(3rd param) with delete function from SQLiteDatabase class.