database - SQLite query not work on Android rawQuery -
edit: problem solved, query correct. problem is; work local database. , i'm not reach database directly assets folder. code copy database assets folder sd card when database not exits on sd card. therefore database changes effect database in asset folder. , tried right query on old database. sorry question.
i tried sqlite query on db browser sqlite , it's worked.
but on android same query not worked.
string[] = new string[1]; a[0] = yazilankelime + '%'; cursor friendcursor = db.rawquery( "select * kelimeler kelime ? order sayi desc limit 10", a);
if remove "order sayi desc" part, it's work. doing wrong?
update: return exception: android.database.sqlite.sqliteexception: no such column: sayi (code 1): , while compiling: select * kelimeler kelime ? order sayi desc limit 10
db schema:
as exception says, no such column: sayi
means column sayi
not exists in table kelimeler
. check first.
Comments
Post a Comment