Changeset 17289
- Timestamp:
- 2008/04/25 17:39:16 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/class/pages/admin/contents/LC_Page_Admin_Contents_CampaignCreateTag.php
r16582 r17289 87 87 break; 88 88 case 'search_category_id': 89 // 子カテゴリIDの取得 90 $arrRet = $objDb->sfGetChildsID("dtb_category", "parent_category_id", "category_id", $val); 91 $tmp_where = ""; 92 foreach ($arrRet as $val) { 93 if($tmp_where == "") { 94 $tmp_where.= " AND ( category_id = ?"; 95 } else { 96 $tmp_where.= " OR category_id = ?"; 97 } 98 $arrval[] = $val; 89 list($tmp_where, $tmp_arrval) = $objDb->sfGetCatWhere($val); 90 if($tmp_where != "") { 91 $where.= " AND product_id IN (SELECT product_id FROM dtb_product_categories WHERE " . $tmp_where . ")"; 92 $arrval = array_merge((array)$arrval, (array)$tmp_arrval); 99 93 } 100 $where.= $tmp_where . " )";101 94 break; 102 95 case 'search_product_id': 103 if($val != "") { 104 $where .= " AND product_id = ?"; 105 if(!SC_Utils_Ex::sfIsInt($val)) $val = 0; 106 $arrval[] = $val; 107 } 96 $where .= " AND product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code LIKE ? GROUP BY product_id)"; 97 $arrval[] = "$val%"; 108 98 break; 109 99 default:
Note: See TracChangeset
for help on using the changeset viewer.