Changeset 16919
- Timestamp:
- 2007/12/14 16:57:42 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/data/class/pages/admin/contents/LC_Page_Admin_Contents_RecommendSearch.php
r16741 r16919 84 84 switch ($key) { 85 85 case 'search_name': 86 87 86 $where .= " AND name ILIKE ?"; 88 87 $arrval[] = "%$val%"; 89 88 break; 90 89 case 'search_category_id': 91 // 子カテゴリIDの取得 92 $arrRet = $objDb->sfGetChildsID("dtb_category", "parent_category_id", "category_id", $val); 93 $tmp_where = ""; 94 foreach ($arrRet as $val) { 95 if($tmp_where == "") { 96 $tmp_where.= " AND ( category_id = ?"; 97 } else { 98 $tmp_where.= " OR category_id = ?"; 99 } 100 $arrval[] = $val; 90 list($tmp_where, $tmp_arrval) = $objDb->sfGetCatWhere($val); 91 if($tmp_where != "") { 92 $where.= " AND product_id IN (SELECT product_id FROM dtb_product_categories WHERE " . $tmp_where . ")"; 93 $arrval = array_merge((array)$arrval, (array)$tmp_arrval); 101 94 } 102 $where.= $tmp_where . " )";103 95 break; 104 96 case 'search_product_code': 105 $where .= " AND product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code ILIKE ? GROUP BY product_id)"; 106 $where .= " OR product_code ILIKE ?"; 107 $arrval[] = "%$val%"; 108 $arrval[] = "%$val%"; 97 $where .= " AND product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code LIKE ? GROUP BY product_id)"; 98 $arrval[] = "$val%"; 109 99 break; 110 100 default:
Note: See TracChangeset
for help on using the changeset viewer.