-1
海蘭大家android.database.sqlite.SQLiteException:近「?」:語法錯誤
我有一個光標,我需要在where子句如果特定ID屬於一個數組來驗證。
但是我哈弗錯誤
android.database.sqlite.SQLiteException:近 「?」:語法錯誤:,在編譯:SELECT DISPLAY_NAME,_id FROM view_data_restricted數據,其中(1)和(數據1 IN?和MIME類型= 'vnd.android.cursor.item/group_membership' AND DISPLAY_NAME LIKE '%R%')ORDER BY DISPLAY_NAME
這裏是我的代碼
cursorContactosGrupos = managedQuery(ContactsContract.Data.CONTENT_URI,
new String[]{ContactsContract.CommonDataKinds.GroupMembership.DISPLAY_NAME, ContactsContract.CommonDataKinds.GroupMembership._ID},
ContactsContract.CommonDataKinds.GroupMembership.GROUP_ROW_ID + " IN ? AND " + Data.MIMETYPE + "='" + ContactsContract.CommonDataKinds.GroupMembership.CONTENT_ITEM_TYPE + "' AND " + ContactsContract.CommonDataKinds.GroupMembership.DISPLAY_NAME + " like '%" + filter + "%'" ,
new String[]{arrayTeste.toString().replace("[","(").replace("]",")")},
ContactsContract.CommonDataKinds.GroupMembership.DISPLAY_NAME
);
你能幫助我嗎? 感謝
具有u檢查DIS? –
你該幹什麼? –