Changeset 22594
- Timestamp:
- 2013/03/01 21:52:02 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/helper/SC_Helper_Category.php
r22589 r22594 51 51 public function getList($cid_to_key = FALSE) 52 52 { 53 $objQuery =& SC_Query_Ex::getSingletonInstance(); 54 $col = '*'; 55 $from = 'dtb_category left join dtb_category_total_count ON dtb_category.category_id = dtb_category_total_count.category_id'; 56 // 登録商品数のチェック 57 if ($this->count_check) { 58 $where = 'del_flg = 0 AND product_count > 0'; 59 } else { 60 $where = 'del_flg = 0'; 53 static $arrCategory = array(); 54 55 if (!isset($arrCategory[$this->count_check])) { 56 $objQuery =& SC_Query_Ex::getSingletonInstance(); 57 $col = '*'; 58 $from = 'dtb_category left join dtb_category_total_count ON dtb_category.category_id = dtb_category_total_count.category_id'; 59 // 登録商品数のチェック 60 if ($this->count_check) { 61 $where = 'del_flg = 0 AND product_count > 0'; 62 } else { 63 $where = 'del_flg = 0'; 64 } 65 $objQuery->setOption('ORDER BY rank DESC'); 66 $arrTmp = $objQuery->select($col, $from, $where); 67 68 $arrCategory[$this->count_check] = $arrTmp; 61 69 } 62 $objQuery->setOption('ORDER BY rank DESC');63 $arrCategory = $objQuery->select($col, $from, $where);64 70 65 71 if ($cid_to_key) { 66 72 // 配列のキーをカテゴリーIDに 67 $arrCategory = SC_Utils_Ex::makeArrayIDToKey('category_id', $arrCategory);73 return SC_Utils_Ex::makeArrayIDToKey('category_id', $arrCategory[$this->count_check]); 68 74 } 69 70 return $arrCategory ;75 76 return $arrCategory[$this->count_check]; 71 77 } 72 78
Note: See TracChangeset
for help on using the changeset viewer.