action(); $this->sendResponse(); } /** * Page のアクション. * * @return void */ function action() { // 基本情報を渡す $objSiteInfo = SC_Helper_DB_Ex::sfGetBasisData(); $this->arrInfo = $objSiteInfo->data; //ランキング表示 $this->arrRanking = $this->lfGetRanking(); } /** * デストラクタ. * * @return void */ function destroy() { parent::destroy(); } //ランキング検索 function lfGetRanking(){ $objQuery =& SC_Query_Ex::getSingletonInstance(); $objProduct = new SC_Product_Ex(); $col = "T1.product_id, T1.product_name as name,T3.main_list_image,T3.main_list_comment,T4.price02,COUNT(*) AS order_count "; $from = "dtb_order_detail AS T1 INNER JOIN dtb_order AS T2 ON T1.order_id = T2.order_id INNER JOIN dtb_products AS T3 ON T1.product_id = T3.product_id INNER JOIN dtb_products_class AS T4 ON T1.product_id = T4.product_id where T3.del_flg != 1"; $objQuery->setGroupby("T1.product_id,T1.product_name,T3.main_list_image"); $objQuery->setOrder("order_count DESC"); $objQuery->setLimit(5); return $objQuery->select($col, $from); } } ?>