我想从表中获取特定数据..我已插入查询,但它给了我错误...我的应用程序将崩溃...活动代码是
public Cursor getpicSpecfic(String st)
{
return db.query(DATABASE_TABLE_PIC,
new String[] {"id", "pic_name", "pic_place","pic_fellows","pic_purpose","pic_location","pic_jeoPoint_longi","pic_jeoPoint_lati","pic_sd_card","pic_time","pic_date"},
"pic_name"+"="+st, null, null, null, null);
}
而logcat中的错误是
01-31 01:43:13.033: E/AndroidRuntime(877): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.imagegallary/com.example.imagegallary.FullImageDetail}: android.database.sqlite.SQLiteException: no such column: nnn (code 1): , while compiling: SELECT id, pic_name, pic_place, pic_fellows, pic_purpose, pic_location, pic_jeoPoint_longi, pic_jeoPoint_lati, pic_sd_card, pic_time, pic_date FROM Img WHERE pic_name=nnn
我正在传递一个字符串 nnn,它是图片名称 ..我通过 sqllite 浏览器看到这将存在 nnn ......任何帮助