How to get only one record in Join Query in Magento
$orders->getSelect()->join(["Category" => "catalog_category_product"], "Category.category_id=( select category_id from catalog_category_product AS p1 where SFOI.product_id = p1.product_id limit 1 ) AND SFOI.product_id=Category.product_id", []);
No comments:
Post a Comment