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

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

File:
1 edited

Legend:

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

    r21553 r21563  
    219219     * FIXME MDB2::exec() の実装であるべき 
    220220     */ 
    221     function exec($str, $arrval = array()) { 
    222         return $this->query($str, $arrval); 
     221    function exec($str, $arrVal = array()) { 
     222        return $this->query($str, $arrVal); 
    223223    } 
    224224 
     
    232232     * @return boolean 結果 
    233233     */ 
    234     function doCallbackAll($cbFunc, $sql, $arrval = array(), $fetchmode = MDB2_FETCHMODE_ASSOC) { 
     234    function doCallbackAll($cbFunc, $sql, $arrVal = array(), $fetchmode = MDB2_FETCHMODE_ASSOC) { 
    235235 
    236236        $sql = $this->dbFactory->sfChangeMySQL($sql); 
     
    241241        } 
    242242 
    243         $affected =& $this->execute($sth, $arrval); 
     243        $affected =& $this->execute($sth, $arrVal); 
    244244        if (PEAR::isError($affected) && $this->force_run) { 
    245245            return; 
     
    264264     * @return array データを含む2次元配列。失敗した場合に 0 または DB_Error オブジェクトを返します。 
    265265     */ 
    266     function getAll($sql, $arrval = array(), $fetchmode = MDB2_FETCHMODE_ASSOC) { 
     266    function getAll($sql, $arrVal = array(), $fetchmode = MDB2_FETCHMODE_ASSOC) { 
    267267 
    268268        $sql = $this->dbFactory->sfChangeMySQL($sql); 
     
    273273        } 
    274274 
    275         $affected =& $this->execute($sth, $arrval); 
     275        $affected =& $this->execute($sth, $arrVal); 
    276276        if (PEAR::isError($affected) && $this->force_run) { 
    277277            return; 
     
    583583     * @param string $col カラム名 
    584584     * @param string $where 付与する WHERE 句 
    585      * @param array $arrval プレースホルダに挿入する値 
     585     * @param array $arrWhereVal プレースホルダに挿入する値 
    586586     * @return integer MAX文の実行結果 
    587587     */ 
    588     function max($col, $table, $where = '', $arrval = array()) { 
    589         $ret = $this->get("MAX($col)", $table, $where, $arrval); 
     588    function max($col, $table, $where = '', $arrWhereVal = array()) { 
     589        $ret = $this->get("MAX($col)", $table, $where, $arrWhereVal); 
    590590        return $ret; 
    591591    } 
     
    597597     * @param string $col カラム名 
    598598     * @param string $where 付与する WHERE 句 
    599      * @param array $arrval プレースホルダに挿入する値 
     599     * @param array $arrWhereVal プレースホルダに挿入する値 
    600600     * @return integer MIN文の実行結果 
    601601     */ 
    602     function min($col, $table, $where = '', $arrval = array()) { 
    603         $ret = $this->get("MIN($col)", $table, $where, $arrval); 
     602    function min($col, $table, $where = '', $arrWhereVal = array()) { 
     603        $ret = $this->get("MIN($col)", $table, $where, $arrWhereVal); 
    604604        return $ret; 
    605605    } 
     
    625625     * 
    626626     * @param string $sql 実行する SQL 
    627      * @param array $arrval プレースホルダに挿入する値 
     627     * @param array $arrVal プレースホルダに挿入する値 
    628628     * @return mixed SQL の実行結果 
    629629     */ 
    630     function getOne($sql, $arrval = array()) { 
     630    function getOne($sql, $arrVal = array()) { 
    631631 
    632632        $sql = $this->dbFactory->sfChangeMySQL($sql); 
     
    637637        } 
    638638 
    639         $affected =& $this->execute($sth, $arrval); 
     639        $affected =& $this->execute($sth, $arrVal); 
    640640        if (PEAR::isError($affected) && $this->force_run) { 
    641641            return; 
     
    722722     * @param string $table テーブル名 
    723723     * @param string $where WHERE句 
    724      * @param array $arrval プレースホルダ 
     724     * @param array $arrWhereVal プレースホルダ 
    725725     * @return 
    726726     */ 
    727     function delete($table, $where = '', $arrval = array()) { 
     727    function delete($table, $where = '', $arrWhereVal = array()) { 
    728728        if (strlen($where) <= 0) { 
    729729            $sqlde = "DELETE FROM $table"; 
     
    731731            $sqlde = "DELETE FROM $table WHERE $where"; 
    732732        } 
    733         $ret = $this->query($sqlde, $arrval, false, null, MDB2_PREPARE_MANIP); 
     733        $ret = $this->query($sqlde, $arrWhereVal, false, null, MDB2_PREPARE_MANIP); 
    734734        return $ret; 
    735735    } 
Note: See TracChangeset for help on using the changeset viewer.