Changeset 20202


Ignore:
Timestamp:
2011/02/19 18:29:53 (13 years ago)
Author:
ume
Message:

#973 [管理画面]商品管理 検索部分のview系の処理を削除

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/pages/admin/products/LC_Page_Admin_Products.php

    r20201 r20202  
    124124            if (count($this->arrErr) == 0) { 
    125125                $where = "del_flg = 0"; 
    126                 $view_where = "del_flg = 0"; 
    127126                foreach ($arrParam as $key => $val) { 
    128127                    if($val == "") { 
    129128                        continue; 
    130129                    } 
    131                     $this->buildQuery($key, $where, $view_where, $arrval, $objFormParam, $objDb); 
     130                    $this->buildQuery($key, $where, $arrval, $objFormParam, $objDb); 
    132131                } 
    133132 
     
    274273     * クエリパラメータは, SC_FormParam の入力値から取得する. 
    275274     * 
    276      * 構築内容は, 引数の $where, $view_where 及び $arrValues にそれぞれ追加される. 
     275     * 構築内容は, 引数の $where 及び $arrValues にそれぞれ追加される. 
    277276     * 
    278277     * @param string $key 検索条件のキー 
    279278     * @param string $where 構築する WHERE 句 
    280      * @param string $view_where 構築する WHERE 句 
    281279     * @param array $arrValues 構築するクエリパラメータ 
    282280     * @param SC_FormParam $objFormParam SC_FormParam インスタンス 
     
    284282     * @return void 
    285283     */ 
    286     function buildQuery($key, &$where, &$view_where, &$arrValues, &$objFormParam, &$objDb) { 
     284    function buildQuery($key, &$where, &$arrValues, &$objFormParam, &$objDb) { 
    287285        $dbFactory = SC_DB_DBFactory::getInstance(); 
    288286        switch ($key) { 
     
    290288        case 'search_product_id': 
    291289            $where .= " AND product_id = ?"; 
    292             $view_where .= " AND product_id = ?"; 
    293290            $arrValues[] = sprintf('%d', $objFormParam->getValue($key)); 
    294291            break; 
     
    296293        case 'search_product_code': 
    297294            $where .= " AND product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code ILIKE ? GROUP BY product_id)"; 
    298             $view_where .= " AND EXISTS (SELECT product_id FROM dtb_products_class as cls WHERE cls.product_code ILIKE ? AND dtb_products.product_id = cls.product_id GROUP BY cls.product_id )"; 
    299295            $arrValues[] = sprintf('%%%s%%', $objFormParam->getValue($key)); 
    300296            break; 
     
    302298        case 'search_name': 
    303299            $where .= " AND name LIKE ?"; 
    304             $view_where .= " AND name LIKE ?"; 
    305300            $arrValues[] = sprintf('%%%s%%', $objFormParam->getValue($key)); 
    306301            break; 
     
    310305            if($tmp_where != "") { 
    311306                $where.= " AND product_id IN (SELECT product_id FROM dtb_product_categories WHERE " . $tmp_where . ")"; 
    312                 $view_where.= " AND product_id IN (SELECT product_id FROM dtb_product_categories WHERE " . $tmp_where . ")"; 
    313307                $arrValues = array_merge((array)$arrValues, (array)$tmp_Values); 
    314308            } 
     
    331325                $tmp_where .= ")"; 
    332326                $where .= " $tmp_where "; 
    333                 $view_where .= " $tmp_where"; 
    334327            } 
    335328            break; 
     
    340333                                                $objFormParam->getValue('search_startday')); 
    341334            $where.= " AND update_date >= ?"; 
    342             $view_where.= " AND update_date >= ?"; 
    343335            $arrValues[] = $date; 
    344336            break; 
     
    349341                                                $objFormParam->getValue('search_endday'), true); 
    350342            $where.= " AND update_date <= ?"; 
    351             $view_where.= " AND update_date <= ?"; 
    352343            $arrValues[] = $date; 
    353344            break; 
     
    358349                foreach($objFormParam->getValue($key) as $param) { 
    359350                    $where .= "?,"; 
    360                     $view_where .= "?,"; 
    361351                    $arrValues[] = $param; 
    362352                } 
    363353                $where = preg_replace("/,$/", "))", $where); 
    364                 $view_where = preg_replace("/,$/", "))", $where); 
    365354            } 
    366355            break; 
Note: See TracChangeset for help on using the changeset viewer.