Ignore:
Timestamp:
2010/03/11 10:35:11 (14 years ago)
Author:
kajiwara
Message:

正式版にナイトリービルド版をマージしてみるテスト

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tmp/version-2_5-test/data/class/pages/admin/products/LC_Page_Admin_Products_ProductRank.php

    r18007 r18609  
    5757     */ 
    5858    function process() { 
    59         $conn = new SC_DBConn(); 
     59        $objQuery = new SC_Query(); 
    6060        $objView = new SC_AdminView(); 
    6161        $objSess = new SC_Session(); 
     
    9393            $this->tpl_pageno = ""; 
    9494            break; 
     95             
     96        case 'renumber': 
     97            $sql = <<< __EOS__ 
     98                UPDATE dtb_product_categories 
     99                SET 
     100                    rank = 
     101                        ( 
     102                            SELECT COUNT(*) 
     103                            FROM dtb_product_categories t_in 
     104                            WHERE t_in.category_id = dtb_product_categories.category_id 
     105                                AND ( 
     106                                    t_in.rank < dtb_product_categories.rank 
     107                                    OR ( 
     108                                        t_in.rank = dtb_product_categories.rank 
     109                                        AND t_in.product_id < dtb_product_categories.product_id 
     110                                    ) 
     111                                ) 
     112                        ) + 1 
     113                WHERE dtb_product_categories.category_id = ? 
     114__EOS__; 
     115            $objQuery->query($sql, array($_POST['parent_category_id'])); 
     116            break; 
     117         
    95118        default: 
    96119            break; 
     
    117140    function lfGetProduct($category_id) { 
    118141        $objQuery = new SC_Query(); 
    119         $col = "T2.product_id, name, main_list_image, T2.rank, product_code"; 
    120         $table = "vw_products_nonclass AS noncls " 
    121             . " LEFT JOIN dtb_product_categories AS T2 USING (product_id)"; 
    122         $where = "del_flg = 0 AND T2.category_id = ?"; 
     142        $col = "product_id, name, main_list_image, product_code_min, product_code_max, status"; 
     143        $table = "vw_products_allclass AS allcls"; 
     144        $where = "del_flg = 0 AND category_id = ?"; 
    123145 
    124146        // 行数の取得 
     
    130152        $startno = $objNavi->start_row; 
    131153        $this->tpl_start_row = $objNavi->start_row; 
    132         $this->tpl_strnavi = $objNavi->strnavi;     // Navi表示文字列 
    133         $this->tpl_pagemax = $objNavi->max_page;        // ページ最大数(「上へ下へ」表示判定用) 
    134         $this->tpl_disppage = $objNavi->now_page;   // 表示ページ番号(「上へ下へ」表示判定用) 
     154        $this->tpl_strnavi = $objNavi->strnavi;     // Navi表示文字列 
     155        $this->tpl_pagemax = $objNavi->max_page;    // ページ最大数(「上へ下へ」表示判定用) 
     156        $this->tpl_disppage = $objNavi->now_page;   // 表示ページ番号(「上へ下へ」表示判定用) 
    135157 
    136158        // 取得範囲の指定(開始行番号、行数のセット) 
    137         if(DB_TYPE != "mysql") $objQuery->setlimitoffset(SEARCH_PMAX, $startno); 
     159        $objQuery->setlimitoffset(SEARCH_PMAX, $startno); 
    138160 
    139         $objQuery->setorder("rank DESC"); 
     161        $objQuery->setorder("product_rank DESC, product_id DESC"); 
    140162 
    141163        $arrRet = $objQuery->select($col, $table, $where, array($category_id)); 
Note: See TracChangeset for help on using the changeset viewer.