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 ') order by pi.id desc' at line 1

select pd.products_name,pi.products_id,pi.image, pi.htmlcontent from products_images pi, products_description pd where pd.products_id = pi.products_id and (pi.sort_order=1) and () order by pi.id desc

[TEP STOP]