public boolean check()
{
db=SQLiteDatabase.openDatabase("Hotels",null,SQLiteDatabase.OPEN_READONLY);
String query="Select * from hot where email='x' and phone='w'";
Cursor c=db.rawQuery(query,null);
if(c.getCount()>0)
return true;
else
return false;
}
Here I am trying to check whether the user with this name and mobile number exists or not.if it exists then it should return true otherwise false.Here Hotels is the name of database and hot is the name of table.