this statement will return all the records whose keyname equals string specified by string, if you use wild card, then you can get desired results. Like:
mDb.query(true, DATABASE_NAMES_TABLE, new String[] { KEY_ROWID,
KEY_NAME }, KEY_NAME + " LIKE ?",
new String[] { filter+"%" }, null, null, null,
null);
Will Lists all the records starting with word in filter.
mDb.query(true, DATABASE_NAMES_TABLE, new String[] { KEY_ROWID,
KEY_NAME }, KEY_NAME + " LIKE ?",
new String[] {"%"+ filter+ "%" }, null, null, null,
null);
Will Lists all the records containing word in filter.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…