-1
我有一個表「TABLE_QUESTION」。我需要通過exam_id和question_Id取記錄。我寫了一個查詢來從表中獲取記錄,但它顯示異常"SQLite Exception near question_id"
。SQLite:通過傳遞兩個值來檢索記錄
這是我給大家參考查詢..
String selectQuery=("select * from question where exam_id ='" + examId + " and question_id ='" + questionId +"'");
Cursor cursor = db.rawQuery(selectQuery, null);
:我總是與DIS單和雙引號迷惑,不要ü有什麼參考要說清楚 – 2012-04-07 07:02:28
可以參考這個技巧http://www.techtamasha.com/escape-single-quotes-and-wild-cards-_-in-ms-sql/20 – 2012-04-07 07:08:38
謝謝@hotveryspicy – 2012-04-07 07:30:38