Ignore:
Timestamp:
2012/02/28 22:35:14 (12 years ago)
Author:
Seasoft
Message:

#1669 (変数の初期化漏れ)
#1613 (typo修正・ソース整形・ソースコメントの改善)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/helper/SC_Helper_DB.php

    r21544 r21563  
    104104     *               $add == false で, データが存在しない場合 false 
    105105     */ 
    106     function sfDataExists($table_name, $where, $arrval, $dsn = '', $sql = '', $add = false) { 
     106    function sfDataExists($table_name, $where, $arrWhereVal, $dsn = '', $sql = '', $add = false) { 
    107107        $dbFactory = SC_DB_DBFactory_Ex::getInstance(); 
    108108        $dsn = $dbFactory->getDSN($dsn); 
    109109 
    110110        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    111         $exists = $objQuery->exists($table_name, $where, $arrval); 
     111        $exists = $objQuery->exists($table_name, $where, $arrWhereVal); 
    112112 
    113113        // データを追加する 
     
    771771        $from = $objProduct->alldtlSQL($where_products_class); 
    772772        foreach ($arrTgtCategory_id as $category_id) { 
    773             $arrval = array(); 
    774             list($tmp_where, $tmp_arrval) = $this->sfGetCatWhere($category_id); 
     773            $arrWhereVal = array(); 
     774            list($tmp_where, $arrTmpVal) = $this->sfGetCatWhere($category_id); 
    775775            if ($tmp_where != '') { 
    776776                $sql_where_product_ids = 'product_id IN (SELECT product_id FROM dtb_product_categories WHERE ' . $tmp_where . ')'; 
    777                 $arrval = $tmp_arrval; 
     777                $arrWhereVal = $arrTmpVal; 
    778778            } else { 
    779779                $sql_where_product_ids = '0<>0'; // 一致させない 
     
    781781            $where = "($sql_where) AND ($sql_where_product_ids)"; 
    782782 
    783             $arrUpdateData[$category_id] = $objQuery->count($from, $where, $arrval); 
     783            $arrUpdateData[$category_id] = $objQuery->count($from, $where, $arrWhereVal); 
    784784        } 
    785785 
     
    933933     * @param string $valname データ内容のカラム名 
    934934     * @param string $where WHERE句 
    935      * @param array $arrval プレースホルダ 
     935     * @param array $arrWhereVal プレースホルダ 
    936936     * @return array SELECT ボックス用リストの配列 
    937937     */ 
     
    12301230     * @param string $table テーブル名 
    12311231     * @param string $col カラム名 
    1232      * @param array $arrval 要素の配列 
     1232     * @param array $arrVal 要素の配列 
    12331233     * @param array $addwhere SQL の AND 条件である WHERE 句 
    12341234     * @return bool レコードが存在する場合 true 
    12351235     */ 
    1236     function sfIsRecord($table, $col, $arrval, $addwhere = '') { 
     1236    function sfIsRecord($table, $col, $arrVal, $addwhere = '') { 
    12371237        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    12381238        $arrCol = preg_split('/[, ]/', $col); 
     
    12531253            } 
    12541254        } 
    1255         $ret = $objQuery->get($col, $table, $where, $arrval); 
     1255        $ret = $objQuery->get($col, $table, $where, $arrVal); 
    12561256 
    12571257        if ($ret != '') { 
Note: See TracChangeset for help on using the changeset viewer.