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 1
select pts.product_id, pts.sound_id, ps.filename as sound_name from products_to_sounds pts left join products_sounds ps on pts.sound_id = ps.sound_id where pts.product_id =