select c.name,c.id,c.mid,pm.manufacturers_name as man_name from manufacturers_collections c left join manufacturers pm on pm.manufacturers_id=c.mid where c.mid in() || 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 ')' at line 3