Changeset 21514 for branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products.php
- Timestamp:
- 2012/02/15 19:56:17 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products.php
r21490 r21514 103 103 case 'delete': 104 104 // 商品、子テーブル(商品規格)、会員お気に入り商品の削除 105 $this->doDelete( "product_id = ?", array($objFormParam->getValue('product_id')));105 $this->doDelete('product_id = ?', array($objFormParam->getValue('product_id'))); 106 106 // 件数カウントバッチ実行 107 107 $objDb->sfCountCategory($objQuery); … … 120 120 121 121 if (count($this->arrErr) == 0) { 122 $where = "del_flg = 0";122 $where = 'del_flg = 0'; 123 123 foreach ($arrParam as $key => $val) { 124 if ($val == "") {124 if ($val == '') { 125 125 continue; 126 126 } … … 128 128 } 129 129 130 $order = "update_date DESC";130 $order = 'update_date DESC'; 131 131 132 132 /* ----------------------------------------------- … … 229 229 $objErr->arrErr = $objFormParam->checkError(); 230 230 231 $objErr->doFunc(array( "開始日", "終了日", 'search_startyear', 'search_startmonth', 'search_startday', 'search_endyear', 'search_endmonth', 'search_endday'), array('CHECK_SET_TERM'));231 $objErr->doFunc(array('開始日', '終了日', 'search_startyear', 'search_startmonth', 'search_startday', 'search_endyear', 'search_endmonth', 'search_endday'), array('CHECK_SET_TERM')); 232 232 233 233 return $objErr->arrErr; … … 238 238 $max = count($arrCatKey); 239 239 for ($cnt = 0; $cnt < $max; $cnt++) { 240 $key = isset($arrCatKey[$cnt]) ? $arrCatKey[$cnt] : "";241 $val = isset($arrCatVal[$cnt]) ? $arrCatVal[$cnt] : "";240 $key = isset($arrCatKey[$cnt]) ? $arrCatKey[$cnt] : ''; 241 $val = isset($arrCatVal[$cnt]) ? $arrCatVal[$cnt] : ''; 242 242 $arrRet[$key] = $val; 243 243 } … … 283 283 // 商品ID 284 284 case 'search_product_id': 285 $where .= " AND product_id = ?";285 $where .= ' AND product_id = ?'; 286 286 $arrValues[] = sprintf('%d', $objFormParam->getValue($key)); 287 287 break; 288 288 // 商品コード 289 289 case 'search_product_code': 290 $where .= " AND product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code ILIKE ? GROUP BY product_id)";290 $where .= ' AND product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code ILIKE ? GROUP BY product_id)'; 291 291 $arrValues[] = sprintf('%%%s%%', $objFormParam->getValue($key)); 292 292 break; 293 293 // 商品名 294 294 case 'search_name': 295 $where .= " AND name LIKE ?";295 $where .= ' AND name LIKE ?'; 296 296 $arrValues[] = sprintf('%%%s%%', $objFormParam->getValue($key)); 297 297 break; … … 299 299 case 'search_category_id': 300 300 list($tmp_where, $tmp_Values) = $objDb->sfGetCatWhere($objFormParam->getValue($key)); 301 if ($tmp_where != "") {302 $where.= " AND product_id IN (SELECT product_id FROM dtb_product_categories WHERE " . $tmp_where . ")";301 if ($tmp_where != '') { 302 $where.= ' AND product_id IN (SELECT product_id FROM dtb_product_categories WHERE ' . $tmp_where . ')'; 303 303 $arrValues = array_merge((array)$arrValues, (array)$tmp_Values); 304 304 } … … 306 306 // 種別 307 307 case 'search_status': 308 $tmp_where = "";308 $tmp_where = ''; 309 309 foreach ($objFormParam->getValue($key) as $element) { 310 if ($element != "") {310 if ($element != '') { 311 311 if (SC_Utils_Ex::isBlank($tmp_where)) { 312 $tmp_where .= " AND (status = ?";312 $tmp_where .= ' AND (status = ?'; 313 313 } else { 314 $tmp_where .= " OR status = ?";314 $tmp_where .= ' OR status = ?'; 315 315 } 316 316 $arrValues[] = $element; … … 319 319 320 320 if (!SC_Utils_Ex::isBlank($tmp_where)) { 321 $tmp_where .= ")";321 $tmp_where .= ')'; 322 322 $where .= " $tmp_where "; 323 323 } … … 328 328 $objFormParam->getValue('search_startmonth'), 329 329 $objFormParam->getValue('search_startday')); 330 $where.= " AND update_date >= ?";330 $where.= ' AND update_date >= ?'; 331 331 $arrValues[] = $date; 332 332 break; … … 336 336 $objFormParam->getValue('search_endmonth'), 337 337 $objFormParam->getValue('search_endday'), true); 338 $where.= " AND update_date <= ?";338 $where.= ' AND update_date <= ?'; 339 339 $arrValues[] = $date; 340 340 break; … … 342 342 case 'search_product_statuses': 343 343 if (count($objFormParam->getValue($key)) > 0) { 344 $where .= " AND product_id IN (SELECT product_id FROM dtb_product_status WHERE product_status_id IN (";344 $where .= ' AND product_id IN (SELECT product_id FROM dtb_product_status WHERE product_status_id IN ('; 345 345 foreach ($objFormParam->getValue($key) as $param) { 346 $where .= "?,";346 $where .= '?,'; 347 347 $arrValues[] = $param; 348 348 } … … 380 380 381 381 // 読み込む列とテーブルの指定 382 $col = "product_id, name, main_list_image, status, product_code_min, product_code_max, price02_min, price02_max, stock_min, stock_max, stock_unlimited_min, stock_unlimited_max, update_date";382 $col = 'product_id, name, main_list_image, status, product_code_min, product_code_max, price02_min, price02_max, stock_min, stock_max, stock_unlimited_min, stock_unlimited_max, update_date'; 383 383 $from = $objProduct->alldtlSQL(); 384 384
Note: See TracChangeset
for help on using the changeset viewer.