title: How can I do an Optional JOIN using SQL
body: <p>I want to return all rows from <code>biometrics</code>, and grab extra data if the JOIN exists. However my current query only returns rows when the userid matches.</p>
  
  <p>How may I fix this so it returns all biometric rows, and extra data from the JOIN if it exists?</p>
  
  <pre><code>SELECT b.id as id, g.date
  FROM `biometrics` as b
  INNER JOIN `users goals` as g ON biometricid = b.id and userid = $user-&gt;id
  </code></pre>