title: Avoiding ambiguous column errors when using JOIN in MySQL
body: <p>My query looks like this:</p>
  
  <pre><code>$sql = "
  SELECT u.*, s.*
  FROM bands u
  inner join statuses s on u.status_id = s.id
  WHERE u.status_id = 1
  ORDER BY u.band_name";
  </code></pre>
  
  <p>And I would like to output the ID from the <code>bands</code> table like so:</p>
  
  <pre><code>&lt;?php while($row = $result-&gt;fetch_assoc()){ ?&gt;
              &lt;tr&gt;
                &lt;?php
                      echo '&lt;td id="' . $row['id'] . '"&gt;This is the band&lt;/td&gt;';
                ?&gt;
              &lt;/tr&gt;
  &lt;?php }
  </code></pre>
  
  <p>but <code>$row['id']</code> is not outputting anything, I'm guessing due to some sort of ambiguous column issue but I'm not sure how to properly query it. I tried <code>$row['u.id']</code> as well but I don't think that is the proper alias use because it didn't output anything either.</p>