Although I have one thing that I'm stuck on. I would like to query a database by the field "group_number".
I have the following code which returns all the rows where "group_number" = CRITERIA (when CRITERIA = one integer).
- Code: Select all
public Cursor fetchRows() throws SQLException {
Cursor cursor =
mDb.query(true, type, new String[] {"_id",
"field_1", "field_2", "example", "group_number"}, "group_number" + "=" + CRITERIA, null,
null, null, null, null);
return cursor;
However I also have an ArrayList containing serveral integers and I'd like to return rows which have a "group_number" equal to any of the numbers in the ArrayList.
So far all I've done is replace CRITERIA with the name of my ArrayList but it's not working.
Would anybody be kind enough to show me how to do this?
p.s sorry for the bad explanation.
Thanks.


