Changeset 18180
 Timestamp:
 2009/07/08 23:57:16 (11 years ago)
 Location:
 branches/comuver2/data/class
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

branches/comuver2/data/class/helper/SC_Helper_DB.php
r18169 r18180 1146 1146 foreach ($arrRet as $val) { 1147 1147 if($tmp_where == "") { 1148 $tmp_where.= " 1148 $tmp_where.= "category_id IN ( ?"; 1149 1149 } else { 1150 1150 $tmp_where.= ",? "; 
branches/comuver2/data/class/pages/products/LC_Page_Products_List.php
r18168 r18180 412 412 // カテゴリからのWHERE文字列取得 413 413 if ( $category_id ) { 414 list($tmp_where, $arrval_category) = $objDb>sfGetCatWhere($category_id); 415 if (strlen($tmp_where) >= 1) { 416 $where_category = "AND $tmp_where"; 417 } 414 list($where_category, $arrval_category) = $objDb>sfGetCatWhere($category_id); 418 415 } 419 416 … … 428 425 429 426 if (strlen($where_category) >= 1) { 430 $where.= " $where_category";427 $where.= " AND $where_category"; 431 428 $arrval = array_merge($arrval, $arrval_category); 432 429 } … … 526 523 527 524 default: 525 if (strlen($where_category) >= 1) { 526 $dtb_product_categories = "(SELECT * FROM dtb_product_categories WHERE $where_category)"; 527 $arrval_order = array_merge($arrval_category, $arrval_category); 528 } else { 529 $dtb_product_categories = 'dtb_product_categories'; 530 } 528 531 $order = <<< __EOS__ 529 532 ( … … 531 534 T3.rank 532 535 FROM 533 dtb_product_categories T2536 $dtb_product_categories T2 534 537 JOIN dtb_category T3 535 538 USING (category_id) 536 539 WHERE T2.product_id = alldtl.product_id 537 $where_category538 540 ORDER BY T3.rank DESC, T2.rank DESC 539 541 LIMIT 1 … … 543 545 T2.rank 544 546 FROM 545 dtb_product_categories T2547 $dtb_product_categories T2 546 548 JOIN dtb_category T3 547 549 USING (category_id) 548 550 WHERE T2.product_id = alldtl.product_id 549 $where_category550 551 ORDER BY T3.rank DESC, T2.rank DESC 551 552 LIMIT 1 … … 553 554 ,product_id 554 555 __EOS__; 555 $arrval_order = array_merge($arrval_category, $arrval_category);556 556 break; 557 557 }
Note: See TracChangeset
for help on using the changeset viewer.