Ignore:
Timestamp:
2011/03/20 15:50:12 (13 years ago)
Author:
shutta
Message:

refs #1180 ([フロント]フロントパーツ(おすすめ商品):並び順が反映されない)
ORDER BY句が働いていなかったのを修正。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Recommend.php

    r20534 r20743  
    9090        // おすすめ商品取得 
    9191        $objQuery = SC_Query_Ex::getSingletonInstance(); 
    92         $sql = ''; 
    93         $sql .= ' SELECT'; 
    94         $sql .= '    T1.best_id,'; 
    95         $sql .= '    T1.category_id,'; 
    96         $sql .= '    T1.rank,'; 
    97         $sql .= '    T1.product_id,'; 
    98         $sql .= '    T1.title,'; 
    99         $sql .= '    T1.comment,'; 
    100         $sql .= '    T1.create_date,'; 
    101         $sql .= '    T1.update_date'; 
    102         $sql .= ' FROM'; 
    103         $sql .= '   dtb_best_products AS T1'; 
    104         $sql .= ' WHERE'; 
    105         $sql .= '   del_flg = 0'; 
     92 
     93        $col = 'best_id, best_id, category_id, rank, product_id, title, comment, create_date, update_date'; 
     94        $table = 'dtb_best_products'; 
     95        $where = 'del_flg = 0'; 
    10696        $objQuery->setOrder('rank'); 
    10797        $objQuery->setLimit(RECOMMEND_NUM); 
    108         $arrBestProducts = $objQuery->getAll($sql); 
     98        $arrBestProducts = $objQuery->select($col, $table, $where); 
    10999        if ( is_array($arrBestProducts) && count($arrBestProducts) > 0 ) { 
    110100            // 各商品の詳細情報を取得 
Note: See TracChangeset for help on using the changeset viewer.