Created
May 24, 2015 01:42
-
-
Save kurozumi/bc53a0e7c5823ffb1bd5 to your computer and use it in GitHub Desktop.
【EC-CUBE2.13】商品ステータス名から商品データを取得
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function lfGetProductsFromProductStatus($name){ | |
$objQuery =& SC_Query_Ex::getSingletonInstance(); | |
$sql = <<< __EOS__ | |
SELECT | |
dtb_products.* | |
FROM dtb_products | |
JOIN dtb_product_status T1 | |
ON T1.product_id = dtb_products.product_id | |
WHERE T1.product_status_id = ( | |
SELECT id FROM mtb_status WHERE name LIKE ? LIMIT 1 | |
) AND | |
dtb_products.del_flg = 0 AND | |
dtb_products.status = 1 | |
__EOS__; | |
return $objQuery->getAll($sql, array($name); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment