public Cursor fetchIsOverride(String username) {
int override = 1;
Cursor cursor = mDb.query(true, OVERRIDE_TABLE, new String[] {KEY_ROWID, KEY_USERNAME, KEY_ISOVERRIDE, KEY_FIRSTNAME, KEY_LASTNAME, KEY_EMAIL, KEY_HOMEPHONE, KEY_WORKPHONE, KEY_PICTURE}, KEY_USERNAME + "= '" + username +"' " + "AND " + KEY_ISOVERRIDE + "=" + override, null, null, null, null, null);
return cursor;
}
I have a row on the table with a KEY_ISOVERRIDE value of 1, and with the username I am querying. This is for certain. Can anyone see anything wrong with this syntax? I’m sure its in the WHERE clause, but as far as I can tell it’s OK. Thanks.
I was being an idiot and including both
moveToFirst(); AND a while loop like:Sorry for the trouble. But maybe someone else will catch their mistake this way too.