Ignore:
Timestamp:
2011/03/07 15:23:39 (16 years ago)
Author:
Seasoft
Message:

#627(ソース整形・ソースコメントの改善)
#628(未使用処理・定義などの削除)

File:
1 edited

Legend:

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

    r20507 r20538  
    215215        $customer_id = $arrRet[0]['customer_id']; 
    216216        if($customer_id != "" && $customer_id >= 1) { 
    217             $arrRet = $objQuery->select("point", "dtb_customer", "customer_id = ?", array($customer_id)); 
     217            $arrRet = $objQuery->select('point', "dtb_customer", "customer_id = ?", array($customer_id)); 
    218218            $point = $arrRet[0]['point']; 
    219219            $rollback_point = $arrRet[0]['point'] + $use_point - $add_point; 
    … …  
    549549            } 
    550550            // 最上位ランクを取得 
    551             $max = ($max < $val["rank"]) ? $val["rank"] : $max; 
    552         } 
    553         $sqlval["rank"] = $max + 1; 
     551            $max = ($max < $val['rank']) ? $val['rank'] : $max; 
     552        } 
     553        $sqlval['rank'] = $max + 1; 
    554554        $objQuery->insert("dtb_product_categories", $sqlval); 
    555555    } 
    … …  
    581581            } 
    582582            // 最下位ランクを取得 
    583             $min = ($min < $val["rank"]) ? $val["rank"] : $min; 
    584         } 
    585         $sqlval["rank"] = $min; 
     583            $min = ($min < $val['rank']) ? $val['rank'] : $min; 
     584        } 
     585        $sqlval['rank'] = $min; 
    586586        $objQuery->insert("dtb_product_categories", $sqlval); 
    587587    } 
    … …  
    984984        } 
    985985        // 対象項目のランクを取得 
    986         $rank = $objQuery->get("rank", $table, $where, array($id)); 
     986        $rank = $objQuery->get('rank', $table, $where, array($id)); 
    987987        // ランクの最大値を取得 
    988         $maxrank = $objQuery->max("rank", $table, $andwhere); 
     988        $maxrank = $objQuery->max('rank', $table, $andwhere); 
    989989        // ランクが最大値よりも小さい場合に実行する。 
    990990        if($rank < $maxrank) { 
    … …  
    10241024        } 
    10251025        // 対象項目のランクを取得 
    1026         $rank = $objQuery->get("rank", $table, $where, array($id)); 
     1026        $rank = $objQuery->get('rank', $table, $where, array($id)); 
    10271027 
    10281028        // ランクが1(最小値)よりも大きい場合に実行する。 
    … …  
    10661066            $getWhere = "$keyIdColumn = ?"; 
    10671067        } 
    1068         $rank = $objQuery->get("rank", $tableName, $getWhere, array($keyId)); 
    1069  
    1070         $max = $objQuery->max("rank", $tableName, $where); 
     1068        $rank = $objQuery->get('rank', $tableName, $getWhere, array($keyId)); 
     1069 
     1070        $max = $objQuery->max('rank', $tableName, $where); 
    10711071 
    10721072        // 値の調整(逆順) 
    … …  
    10861086 
    10871087        // XXX 入れ替え先の順位が入れ替え元の順位と同じ場合 
    1088         if (!isset($term)) $term = "rank"; 
     1088        if (!isset($term)) $term = 'rank'; 
    10891089 
    10901090        // 指定した順位の商品から移動させる商品までのrankを1つずらす 
    … …  
    11291129            $where.= " AND $andwhere"; 
    11301130        } 
    1131         $rank = $objQuery->get("rank", $table, $where, array($id)); 
     1131        $rank = $objQuery->get('rank', $table, $where, array($id)); 
    11321132 
    11331133        if(!$delete) { 
    … …  
    11741174        } 
    11751175 
    1176         $objQuery->setOrder("level"); 
     1176        $objQuery->setOrder('level'); 
    11771177        $arrRet = $objQuery->select($col, $table, $where, $arrId); 
    11781178        return $arrRet; 
    … …  
    11981198        // 移動レコードのランクを取得する。 
    11991199        $where = "$id_name = ?"; 
    1200         $rank = $objQuery->get("rank", $table, $where, array($id)); 
     1200        $rank = $objQuery->get('rank', $table, $where, array($id)); 
    12011201        // 削除レコードのランクより上のレコードを一つ下にずらす。 
    12021202        $where = "rank > ? AND $cat_name = ?"; 
    … …  
    12051205        // 新カテゴリでの登録処理 
    12061206        // 新カテゴリの最大ランクを取得する。 
    1207         $max_rank = $objQuery->max("rank", $table, "$cat_name = ?", array($new_catid)) + 1; 
     1207        $max_rank = $objQuery->max('rank', $table, "$cat_name = ?", array($new_catid)) + 1; 
    12081208        $where = "$id_name = ?"; 
    12091209        $sqlup = "UPDATE $table SET rank = ? WHERE $where"; 
Note: See TracChangeset for help on using the changeset viewer.