我想執行一個ManagedQuery的時候,但我在我的日誌得到一個錯誤:SQLiteException執行查詢
查詢
Cursor cursor = managedQuery(GroceryListContentProvider.NOTES_URI,projection,Notes.NOTE_TITLE+"="+S+" AND "+ Notes.NOTE_DATE+"="+S1, null, null);
錯誤日誌
02-21 16:00:52.395: E/AndroidRuntime(22534): java.lang.RuntimeException: Unable to start activity ComponentInfo{net.schuemie.GroceryList/net.schuemie.GroceryList.shoppinglist}: android.database.sqlite.SQLiteException: near "new": syntax error: , while compiling: SELECT item_name FROM notes WHERE (title=shop new AND date=12/2/12) ORDER BY title
這不是一個編譯錯誤,它是一個運行時錯誤,因此' RuntimeException的';-) – 2012-02-21 11:01:22