When i open my RSS app, i would like to check if an article exists in my database.If it exists,i would like to delete it (or ignore it),if not to write it in the db.
This is a typical issue with not using the selectionArgs, and it is exactly why one should use them: You are quoting your string with simple quotes, but your string contains single quote, so SQLite detect the end of the string before it actually ends, and try to parse the rest as SQLite keyword.
The proper solution is to leave the escaping to SQLite, by using those selectionArgs rather that trying to do the escaping your self. in you case, that would be :
Cursor cursor = ourDatabase.rawQuery("select 1 from "
+ DBHelper.DATABASE_TABLE + " where " + DBHelper.TITLE + "=?"
+ " AND " + DBHelper.DATE + "=?",
new String[] {title, date});
plus, it's cleaner because you can make a constant out of your query rather than constructing it every time.