mardi 13 octobre 2015

android sqlite 'like' query and modulo expression

when i use LIKE query in android sql, i want 'contains' query about some input.

db.query(TABLE,
         new String[]{COLUMN},
         CONDITIONS + " LIKE " + "?",
         new String[]{("%" + input + "%")},
         null
         null
         ORDER_COLUMN + " DESC",
         null);

query is working well, but when i use '%' character in input, it working like empty string.

i want use '%' character which like normal string.

how can i do..?

thanks.

Aucun commentaire:

Enregistrer un commentaire