title: Getting all fields from one table using INNER JOIN?
body: <p>I want to get all fields from one table and use DISTINCT with the second table.</p>
  
  <p>I have this:</p>
  
  <pre><code>SELECT stats.*, 
  DISTINCT(visit_log.blog_id) AS bid 
  FROM stats 
  INNER JOIN visit_log ON stats.blog_id = visit_log.blog_id
  </code></pre>
  
  <p>But I get this error:</p>
  
  <blockquote>
    <p>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DISTINCT(visit_log.blog_id) AS bid    FROM stats INNER JOIN visit_log ON stats.blog' at line 1</p>
  </blockquote>
  
  <p>Any idea?</p>