FROM #__hikashop_product_related AS a LEFT JOIN #__hikashop_product AS b ON a.product_related_id=b.product_id LEFT JOIN #__hikashop_category AS man ON b.product_manufacturer_id = man.category_id WHERE (b.product_published = 1) AND (a.product_related_type='related') AND (a.product_id=611) AND (b.product_type = 'main') AND ((b.product_access = 'all' OR b.product_access LIKE '%,9,%')) ORDER BY a.product_related_ordering ASC