I’m trying to display items from a database into a listview for all dates within a week after a user selects the first day of the week. To my understanding this should have worked but keeps crashing the app. Any ideas what I’m doing wrong?
Here is the code for my cursor……
mCursor = mDb.query("tracker", null,
"(day_id=? OR day_id=? OR day_id=? OR day_id=? OR day_id=? OR day_id=? OR day_id=?) AND year_id=? AND month_id=? ", new String[] {
String.valueOf(day1), String.valueOf(day1+1), String.valueOf(day1+2), String.valueOf(day1+3),
String.valueOf(day1+4), String.valueOf(day1+5), String.valueOf(day1+6), String.valueOf(year1),
String.valueOf(month1)},
null, null, "_id ASC");
Some help would be greatly appreciated…….
For anybody else looking for the answer this was suggested by Chris Jester-Young above, thanks again