Changeset 23407


Ignore:
Timestamp:
2014/05/08 19:12:35 (10 years ago)
Author:
Seasoft
Message:

#2540 (商品一覧画面 デフォルトの並び替え処理に冗長な処理)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_13-dev/data/class/pages/products/LC_Page_Products_List.php

    r23378 r23407  
    236236                    $dtb_product_categories = 'dtb_product_categories'; 
    237237                } 
    238                 $col = 'T3.rank * 2147483648 + T2.rank'; 
     238                $col = 'MAX(T3.rank * 2147483648 + T2.rank)'; 
    239239                $from = "$dtb_product_categories T2 JOIN dtb_category T3 ON T2.category_id = T3.category_id"; 
    240240                $where = 'T2.product_id = alldtl.product_id'; 
    241                 $objQuery->setOrder('T3.rank DESC, T2.rank DESC'); 
    242                 $objQuery->setLimit(1); 
    243                 $sub_sql = $objQuery->getSqlWithLimitOffset($col, $from, $where); 
     241                $sub_sql = $objQuery->getSql($col, $from, $where); 
    244242 
    245243                $objQuery->setOrder("($sub_sql) DESC ,product_id DESC"); 
Note: See TracChangeset for help on using the changeset viewer.