title: Join a table twice with different condition
body: <p>I've a problem with this mysql query:</p>
  
  <p><strong>Table group</strong>:</p>
  
  <pre class="lang-none prettyprint-override"><code>--------------
  ID      group
  --------------
  50      gr1    
  51      gr2    
  120     gr3    
  121     gr4
  --------------
  </code></pre>
  
  <p><strong>Table rel_group</strong>:</p>
  
  <pre class="lang-none prettyprint-override"><code>---------------------------
  ID      id_oth    type_rel
  --------------------------- 
  50      120         1    
  50      121         1    
  51      50          2
  ---------------------------
  </code></pre>
  
  <p>I need to get the result of the rows (specially 'group.group' and 'rel_group.type_rel') in which number 50 are either on ID column or at id_oth (both looking at rel_group table). I've got some partial results with this queries: </p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT group.group, a.type_rel
  FROM group
  INNER JOIN rel_group a ON ( group.ID = a.id_oth )
  WHERE a.ID = 50    
  
  SELECT group.group, b.type_rel
  FROM group
  INNER JOIN rel_group b ON ( group.ID = b.ID )
  WHERE b.id_oth = 50
  </code></pre>
  
  <p>But if I join both queries in one, the result is always 0 rows.</p>
  
  <p>Does anyone know how to do it?</p>