title: Mysql always 0 results if no data found in JOIN tables when data found in another table?
body: <p>I am having a problem with the sql below. It seems the query returns 0 results if nothing is found when joining tables group_permissions &amp; users_permissions even though something is found in users.</p>
  
  <pre><code>SELECT `*` 
    FROM (`users`) 
    LEFT JOIN `group_permissions` ON `users`.`group_id` = `group_permissions`.`group_id` 
    LEFT JOIN `users_permissions` ON `users`.`user_id` = `users_permissions`.`user_id` 
   WHERE `users`.`username` = 'admin'
  </code></pre>
  
  <p>I can't seem to figure out how to fix so it would still return data from users even when nothing was found in tables group_permissions &amp; users_permissions.</p>
  
  <p><strong>UPDATED</strong></p>
  
  <p>Ok I have changed to LEFT JOIN now my problem is the columns user_id and group_id in table users is overwritten by the ones from group_permissions &amp; users_permissions resulting in value being NULL.</p>
  
  <p>How can I fix this? Is there anyway to alter the JOIN so it doesn't fetch those columns?</p>