Ignore:
Timestamp:
2009/07/07 13:06:12 (15 years ago)
Author:
AMUAMU
Message:

#513 に伴う修正。sfMoveRank関数定義では$whereは空を許容しているが、実際には空で来るとDBエラーになる処理になっていた。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/data/class/helper/SC_Helper_DB.php

    r18134 r18169  
    9696     * @param bool $add カラムの作成も行う場合 true 
    9797     * @return bool カラムが存在する場合とカラムの生成に成功した場合 true, 
    98      *               テーブルが存在しない場合 false, 
    99      *               引数 $add == false でカラムが存在しない場合 false 
     98     *               テーブルが存在しない場合 false, 
     99     *               引数 $add == false でカラムが存在しない場合 false 
    100100     */ 
    101101    function sfColumnExists($table_name, $col_name, $col_type = "", $dsn = "", $add = false) { 
     
    142142     * @param bool $add インデックスの生成もする場合 true 
    143143     * @return bool インデックスが存在する場合とインデックスの生成に成功した場合 true, 
    144      *               テーブルが存在しない場合 false, 
    145      *               引数 $add == false でインデックスが存在しない場合 false 
     144     *               テーブルが存在しない場合 false, 
     145     *               引数 $add == false でインデックスが存在しない場合 false 
    146146     */ 
    147147    function sfIndexExists($table_name, $col_name, $index_name, $length = "", $dsn = "", $add = false) { 
     
    224224    function sfGetRootId() { 
    225225 
    226         if(!$this->g_root_on)   { 
     226        if(!$this->g_root_on)   { 
    227227            $this->g_root_on = true; 
    228228            $objQuery = new SC_Query(); 
     
    300300        $arrClassCatName = $this->sfGetIDValueList("dtb_classcategory", "classcategory_id", "name"); 
    301301 
    302         $objPage->tpl_total_pretax = 0;     // 費用合計(税込み) 
    303         $objPage->tpl_total_tax = 0;        // 消費税合計 
    304         $objPage->tpl_total_point = 0;      // ポイント合計 
     302        $objPage->tpl_total_pretax = 0;     // 費用合計(税込み) 
     303        $objPage->tpl_total_tax = 0;        // 消費税合計 
     304        $objPage->tpl_total_point = 0;      // ポイント合計 
    305305 
    306306        // カート内情報の取得 
     
    12861286 
    12871287        // 自身のランクを取得する 
    1288         $rank = $objQuery->get($tableName, "rank", "$keyIdColumn = ? AND " . $where, array($keyId)); 
     1288        if($where != "") { 
     1289            $getWhere = "$keyIdColumn = ? AND " . $where; 
     1290        } else { 
     1291            $getWhere = "$keyIdColumn = ?"; 
     1292        } 
     1293        $rank = $objQuery->get($tableName, "rank", $getWhere, array($keyId)); 
    12891294 
    12901295        $max = $objQuery->max($tableName, "rank", $where); 
     
    15601565 
    15611566        // 合計の計算 
    1562         $arrData['total'] = $objPage->tpl_total_pretax; // 商品合計 
    1563         $arrData['total']+= $arrData['deliv_fee'];      // 送料 
    1564         $arrData['total']+= $arrData['charge'];         // 手数料 
     1567        $arrData['total'] = $objPage->tpl_total_pretax; // 商品合計 
     1568        $arrData['total']+= $arrData['deliv_fee'];      // 送料 
     1569        $arrData['total']+= $arrData['charge'];         // 手数料 
    15651570        // お支払い合計 
    15661571        $arrData['payment_total'] = $arrData['total'] - ($arrData['use_point'] * POINT_VALUE); 
Note: See TracChangeset for help on using the changeset viewer.