- Code: Select all
Cursor c = dbhelper.fetchInfo(usersearch);
user1 = c.getString(c.getColumnIndex(dbhelper.KEY_username));
"usersearch" increases by one each time to move to the next row and I do the same for user2. However, one user can have their name in the "username" field of more than one row. I don't want to set user2 (etc.) to a name that I have already set user1 to.
How can I filter the info from the database to just give me only UNIQUE user names?