title: MySQL Left Join using key1 or key2
body: <p>I want to be able to use multiple keys to join two tables. Is the following possible?</p>
  
  <pre><code>SELECT * FROM items LEFT JOIN issues USING (item_id OR order_id)
  </code></pre>
  
  <p>This is a simplified version of what i am doing. using MySQL 5.1.36 in case that matters.</p>
  
  <p>UPDATE: I want all the issues joined, using item_id or order_id. So there could be multiple issues per item. i vaguely remember something about group by but i never could figure out how to join multiple records to one.</p>
  
  <p>would be nice to get something that looks like this:</p>
  
  <pre><code>array {
    item_id =&gt; 1,
    item_name =&gt; 'test item',
    issues =&gt; array {
      [0] =&gt; array { issue_id =&gt; 1, issue_type =&gt; 'test issue'},
      [1] =&gt; array { issue_id =&gt; 2, issue_type =&gt; 'test issue'}
    }
  }
  </code></pre>
  
  <p>Hopefully that makes sense. basically, an array of the issues as part of the mysql result</p>