mercredi 29 avril 2015

SQLite query not work on Android rawQuery

I tried my SQLite query on DB Browser for SQLite and it's worked.

But on Android same query not worked.

 String[] a = new String[1];
 a[0] =   yazilanKelime + '%';
 Cursor friendCursor = db.rawQuery( "SELECT * FROM kelimeler WHERE kelime LIKE ? ORDER BY sayi DESC LIMIT 10", a);

If i remove "ORDER BY sayi DESC" part, it's work. Where am I doing wrong?

Aucun commentaire:

Enregistrer un commentaire