An Error Was Encountered

Error Number: 1064

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 '.net.au, bold_data WHERE bold_data.id=mail.i' at line 3

SELECT bold_data.name,count(DISTINCT(bold_images.name)) as barcode_num FROM bold_images, mail.iinet.net.au, bold_data WHERE bold_data.id=mail.iinet.net.au.taxa_key AND mail.iinet.net.au.taxa_key = bold_images.taxa_key AND mail.iinet.net.au.campaign_key=6 AND bold_images.barcodes > 0 AND bold_data.order_name='trogoniformes' GROUP BY name