title: MYSQL Query Left Join
body: <p>Here is my query</p>
  
  <pre><code>select t1.*, t2.name as customer, t2.name as vendor from order t1
  left join contact t2
  on t2.id = t1.cid and t2.id = t1.vendid
  where t1.id = 22
  </code></pre>
  
  <ul>
  <li>contact_Table => id, Name</li>
  <li>order_Table => id, orderName, cid, vendid</li>
  </ul>
  
  <p>My problem is I want to select an order where <code>order.id = 22</code> and instead of <code>order.cid, order.vendid</code> I want their names which exist in contact table.  </p>
  
  <p>Above query result with <code>customer = vendor = NULL</code></p>