I have an android application which has a small database as a db file in the asset folder. The file is called nametoareamap.db.It has a single table named 'map'. The table has two columns(Names and Areas) as following:
Names Areas
Aaron A
Chris A
Helen B
Tim B
My application takes names as input from the user. Suppose some user had input: Aaron, Tim. In this case, in terms of name there are two matches with the database. But they come from different areas. Aaron from A and Tim from B. I want to implement the following logic.
If match > = 2 && the area of the matches are same
{ i take a decision}
else
{i decide something else }
Can anyone kindly provide me the code required to do this with cursor and sqlite databases on Android. I have a database adapter already.Thanks in advance