I\'m trying to create a simple favorites application, where you can keep your favorites pages (from the web for example).
Let\'s say I have the following data in my
You can check using cursor:
public boolean checkEvent(String title, String URL, String tag)
{
SQLiteDatabase db = this.getReadableDatabase();
Cursor cursor = db.query(TABLES,
new String[] { KEY_TITLE,KEY_URL,KEY_TAG },
KEY_TITLE + " = ? and "+ KEY_URL + " = ? and " + KEY_TAG + " = ?" ,
new String[] {title,url,tag},
null, null, null, null);
if(cursor.moveToFirst())
return true; //row exists
else
return false;
}
Edit: Code now copy & paste ready