PHP SQL JOIN避免ID重复

I am using this code:

SELECT * FROM Table1 
      JOIN Table2 USING(venue_id)
      WHERE table2.location = '$MyVariable'

Then to count the number of records return:

$num_rows = mysql_num_rows($result);
echo "$num_rows";

It works great but venue_id in Table1 has lots of entries and I only want it to get one per venue_id

How can I make it so it only returns 1 venue_id instance?

Use GROUP BY clause,

SELECT * FROM Table1 
JOIN Table2 USING(venue_id)
WHERE table2.location = '$MyVariable'
GROUP BY `Table1`.`venue_id`