Ignore:
Timestamp:
2011/02/16 14:12:30 (15 years ago)
Author:
coelacanth
Message:

#964 リファクタリング 共通処理をヘルパークラスへ移動

File:
1 edited

Legend:

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

    r20167 r20171  
    138138     * 
    139139     * @param boolean $force 強制的にDB取得するか 
     140     * @param string $col 取得カラムを指定する 
    140141     * @return array 店舗基本情報の配列 
    141142     */ 
    142     function sfGetBasisData($force = false) { 
     143    function sfGetBasisData($force = false, $col = "") { 
    143144        static $data; 
    144145 
    145146        if ($force || !isset($data)) { 
    146147            $objQuery =& SC_Query::getSingletonInstance(); 
    147             $arrRet = $objQuery->select('*', 'dtb_baseinfo'); 
     148 
     149            if ($col === "") { 
     150                $arrRet = $objQuery->select('*', 'dtb_baseinfo'); 
     151            } else { 
     152                $arrRet = $objQuery->select($col, "dtb_baseinfo"); 
     153            } 
    148154 
    149155            if (isset($arrRet[0])) { 
     
    153159            } 
    154160        } 
    155  
    156161        return $data; 
    157162    } 
     163 
     164    /** 
     165     * 基本情報の登録数を取得する 
     166     * 
     167     * @return int 
     168     */ 
     169    function sfGetBasisCount() { 
     170        $objQuery =& SC_Query::getSingletonInstance(); 
     171 
     172        return $objQuery->count("dtb_baseinfo"); 
     173    } 
     174 
    158175 
    159176    /* 選択中のアイテムのルートカテゴリIDを取得する */ 
Note: See TracChangeset for help on using the changeset viewer.