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 'order by rand() limit 5' at line 1
select distinct p.products_id, p.manufacturers_id, p.products_image, pd.products_name, p.products_tax_class_id, products_price, ptc.categories_id from products p, products_description pd left join products_to_categories ptc on ptc.products_id = p.products_id where p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' and p.products_id != 955 and ptc.categories_id = order by rand() limit 5