There is a database with cities. I'm trying to check if there is a city in the database, but I always get res == 0. If you create a query that displays all cities in logcat, then all cities are correctly displayed in it. Here is the actual code:
public byte checkWord(String city) { if (used.contains(city)) return ALREADY_USED; // ! city = "Рим"; // ! String[] args = new String[] { "city=" + city }; Cursor c = db.rawQuery("SELECT COUNT(*) FROM cities WHERE ?", args); if (c.moveToFirst()) { int res = c.getInt(0); if (res == 1) { c.close(); return OK; } } return CITY_NOT_FOUND; } What could be the reason?
PS Rome is exactly in the database)