String sql = "SELECT * FROM " + TABLE_NAME +
" WHERE " + ENGLISH + " LIKE ? ORDER BY " + ENGLISH + " LIMIT 100";
try {
cursor = db.rawQuery(sql, new String[]{"%" + englishWord + "%"});
For example, in the column ENGLISH, there are "ice", "dice", "vice" etc. When I input the word "ice" in englishWord, I will get the result arranged firstly by "dice", followed by "ice" and "vice". But I would like "ice" to be on the first order because it has the exact word. How I can accomplish this?
Aucun commentaire:
Enregistrer un commentaire