1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND pa.options_id=1 order by po.listorder' at line 1

select distinct pa.options_id, po.id, po.name from products_attributes pa left join products_options po on po.id = pa.options_id and po.language_id = '2' where pa.products_id= AND pa.options_id=1 order by po.listorder