Reputation: 1685
I'm trying to recover from my database
the list of songs downloaded with my program.
Cursor c = mDb.query(DB_TABLE_SONGS, null, KEY_SONG_DOWNLOADED+" = true", null, null, null, null);
And I receive that error
android.database.sqlite.SQLiteException: no such column: true:
while compiling:
SELECT * FROM songs WHERE downloaded = true
Upvotes: 0
Views: 114
Reputation: 15477
Your are missing '' for comparing to a string type column.Try this
Cursor c = mDb.query(DB_TABLE_SONGS, null, KEY_SONG_DOWNLOADED+" = 'true'", null, null, null, null);
Upvotes: 1