안녕하세요..

Query 문을 수행할때, where 문을 만들기 위해 아래와 같이 구현했습니다.
마켓에 올라온 에러를 보니, 검색이 안되는 경우가 있길래 보니, name 에 ' 가 포함되어 있네요.;;;;;

Uri uri = ContactsContract.Contacts.CONTENT_URI; projection = new String[] { ContactsContract.Contacts._ID }; String selection = ContactsContract.Contacts.DISPLAY_NAME + " = '" + target + "'"; c = cr.query(uri, projection, selection, null, null); if (!c.moveToFirst()) return null; String number = getOwner(cr, c.getInt(0)); c.close();

위의 코드에서 결국 selection 문은

DisplayName = 'name'' 처럼 되는 거죠..;;;

이런 경우, 제대로 결과를 받으려면..어떻게 해야 하는건가요??

\' 로는 안되더라구요.ㅠ.ㅠ