title: mysql query to perform multiple inner joins on the same table
body: <p>I need to perform multiple joins on the same table. Below is my query.
  When I execute following query , it gives me duplicate record for a single column.
  Can anyone tell me where am I going wrong?</p>
  
  <pre><code>$result=mysql_query("SELECT DISTINCT *,CONCAT(phno, ' ', vnumber) AS source,CONCAT(phno, ' ', vnumber) AS destination FROM gcm_users as gu
                                                  INNER JOIN message_Log as ml1 ON gu.imei= ml1.Source_ID 
                                                  INNER JOIN message_Log as ml2 ON gu.imei= ml2.Destination_ID
                                                  WHERE  gu.id={$_SESSION['uid']}");
  </code></pre>