Hi,
I want to get all fields from one table and use DISTINCT with the second table.
I have this:
SELECT stats.*,
DISTINCT(visit_log.blog_id) AS bid
FROM stats
INNER JOIN visit_log ON stats.blog_id = visit_log.blog_id
But I get this error:
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
Any idea ?
Thanks!