Java 查询Android时发生sqlite错误
我正在尝试从我的Java 查询Android时发生sqlite错误,java,android,sql,sqlite,Java,Android,Sql,Sqlite,我正在尝试从我的数据库中恢复随程序下载的歌曲列表 Cursor c = mDb.query(DB_TABLE_SONGS, null, KEY_SONG_DOWNLOADED+" = true", null, null, null, null); 我收到了这个错误 android.database.sqlite.SQLiteException: no such column: true: 编译时: SELECT * FROM songs WHERE downloaded = true
数据库
中恢复随程序下载的歌曲列表
Cursor c = mDb.query(DB_TABLE_SONGS, null, KEY_SONG_DOWNLOADED+" = true", null, null, null, null);
我收到了这个错误
android.database.sqlite.SQLiteException: no such column: true:
编译时:
SELECT * FROM songs WHERE downloaded = true
与字符串类型列进行比较时缺少“”。请尝试此操作
Cursor c = mDb.query(DB_TABLE_SONGS, null, KEY_SONG_DOWNLOADED+" = 'true'", null, null, null, null);