title: Android: use ContentResolver, CONTACT_ID is column or row?
body: <p>my question seems silly but it makes me headache by below code. Below code print <code>contactId</code> and <code>telephone number</code> to Screen. </p>
  
  <p>It works well, but something I need to know more clearer:</p>
  
  <pre><code> ContentResolver solver = getContentResolver();
              String mess="";
  
              Cursor cursor = solver.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);
              while (cursor.moveToNext()){
                  String contactId = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));
                  mess = mess + "ID: "+contactId+"\n";
  
                  Cursor phones = getContentResolver().query( ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, ContactsContract.CommonDataKinds.Phone.CONTACT_ID +" = "+ contactId, null, null);
                  while (phones.moveToNext()) { 
                       String phoneNumber = phones.getString(phones.getColumnIndex( ContactsContract.CommonDataKinds.Phone.NUMBER));    
                       mess = mess + phoneNumber + "\n";
                    } 
              }
  </code></pre>
  
  <p>The thing I don't know is this line of above  code:</p>
  
  <pre><code>Cursor phones = getContentResolver().query( ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, ContactsContract.CommonDataKinds.Phone.CONTACT_ID +" = "+ contactId, null, null);
  </code></pre>
  
  <p>As in <code>Android Development</code> about third parameter: </p>
  
  <blockquote>
    <p>selection : A filter declaring which rows to return, formatted as an
    SQL WHERE clause (excluding the WHERE itself). Passing null will
    return all rows for the given URI.</p>
  </blockquote>
  
  <p>So, as this defination, <code>CONTACT_ID</code> acts as "A ROW". (because it <code>filter which row to return</code>),</p>
  
  <p>but as  this line, <code>CONTACT_ID</code> acts as "A COLUMN":</p>
  
  <pre><code>String contactId = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));
  </code></pre>
  
  <p>Please explain for me this point.</p>
  
  <p>thanks :)</p>