I need to create a code snippet that performs the equivalent to the following SQL statement:
select people._id, people.name, phones.number,contact_methods.data from people left outer join contact_methods on people.primary_email=contact_methods._id left outer join phones on people.primary_phone=phones._id where contact_methods.kind=1; The query uses three tables: people, phones and contact_methods, to receive the following columns: People._ID People.NAME Phones.NUMBER ContactMethods.DATA. I hold each row in a ContactEntry class that is used throughout my application. What is the best (fastest) way to get this information in code using ContentProviders. In other words, What is the most efficient way of using ContentProviders to query different tables. If you want to try the query yourself, follow these steps: 1. adb shell, 2. cd /data/data 3. sqlite3 com.android.providers.contacts/databases/contacts.db 4. Copy & paste the query. Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

