Ignore:
Timestamp:
2011/03/04 23:24:33 (13 years ago)
Author:
shutta
Message:

SC_Queryクラスのclass_extends対応

File:
1 edited

Legend:

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

    r20487 r20507  
    7979        $dsn = $dbFactory->getDSN($dsn); 
    8080 
    81         $objQuery =& SC_Query::getSingletonInstance($dsn); 
     81        $objQuery =& SC_Query_Ex::getSingletonInstance($dsn); 
    8282 
    8383        // テーブルが無ければエラー 
     
    119119        $dsn = $dbFactory->getDSN($dsn); 
    120120 
    121         $objQuery =& SC_Query::getSingletonInstance(); 
     121        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    122122        $count = $objQuery->count($table_name, $where, $arrval); 
    123123 
     
    148148 
    149149        if ($force || !isset($data)) { 
    150             $objQuery =& SC_Query::getSingletonInstance(); 
     150            $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    151151 
    152152            if ($col === "") { 
     
    171171     */ 
    172172    function sfGetBasisCount() { 
    173         $objQuery =& SC_Query::getSingletonInstance(); 
     173        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    174174 
    175175        return $objQuery->count("dtb_baseinfo"); 
     
    182182        if(!$this->g_root_on)   { 
    183183            $this->g_root_on = true; 
    184             $objQuery =& SC_Query::getSingletonInstance(); 
     184            $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    185185 
    186186            if (!isset($_GET['product_id'])) $_GET['product_id'] = ""; 
     
    211211     */ 
    212212    function sfGetRollbackPoint($order_id, $use_point, $add_point) { 
    213         $objQuery = new SC_Query(); 
     213        $objQuery = new SC_Query_Ex(); 
    214214        $arrRet = $objQuery->select("customer_id", "dtb_order", "order_id = ?", array($order_id)); 
    215215        $customer_id = $arrRet[0]['customer_id']; 
     
    235235     */ 
    236236    function sfGetCatTree($parent_category_id, $count_check = false) { 
    237         $objQuery =& SC_Query::getSingletonInstance(); 
     237        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    238238        $col = ""; 
    239239        $col .= " cat.category_id,"; 
     
    303303     */ 
    304304    function sfGetMultiCatTree($product_id, $count_check = false) { 
    305         $objQuery =& SC_Query::getSingletonInstance(); 
     305        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    306306        $col = ""; 
    307307        $col .= " cat.category_id,"; 
     
    352352    function sfGetCatCombName($category_id){ 
    353353        // 商品が属するカテゴリIDを縦に取得 
    354         $objQuery =& SC_Query::getSingletonInstance(); 
     354        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    355355        $arrCatID = $this->sfGetParents("dtb_category", "parent_category_id", "category_id", $category_id); 
    356356        $ConbName = ""; 
     
    376376     */ 
    377377    function sfGetCat($category_id){ 
    378         $objQuery =& SC_Query::getSingletonInstance(); 
     378        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    379379 
    380380        // カテゴリーを取得する 
     
    393393    function sfGetFirstCat($category_id){ 
    394394        // 商品が属するカテゴリIDを縦に取得 
    395         $objQuery =& SC_Query::getSingletonInstance(); 
     395        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    396396        $arrRet = array(); 
    397397        $arrCatID = $this->sfGetParents("dtb_category", "parent_category_id", "category_id", $category_id); 
     
    417417     */ 
    418418    function sfGetCategoryList($addwhere = "", $products_check = false, $head = CATEGORY_HEAD) { 
    419         $objQuery =& SC_Query::getSingletonInstance(); 
     419        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    420420        $where = "del_flg = 0"; 
    421421 
     
    455455     */ 
    456456    function sfGetLevelCatList($parent_zero = true) { 
    457         $objQuery =& SC_Query::getSingletonInstance(); 
     457        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    458458 
    459459        // カテゴリ名リストを取得 
     
    512512            $category_id = array($category_id); 
    513513        } else if (SC_Utils_Ex::sfIsInt($product_id) && $product_id != 0 && SC_Helper_DB_Ex::sfIsRecord("dtb_products","product_id", $product_id, $status)) { 
    514             $objQuery =& SC_Query::getSingletonInstance(); 
     514            $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    515515            $where = "product_id = ?"; 
    516516            $category_id = $objQuery->getCol("category_id", "dtb_product_categories", "product_id = ?", array($product_id)); 
     
    534534                        "product_id" => $product_id); 
    535535 
    536         $objQuery =& SC_Query::getSingletonInstance(); 
     536        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    537537 
    538538        // 現在の商品カテゴリを取得 
     
    566566                        "product_id" => $product_id); 
    567567 
    568         $objQuery =& SC_Query::getSingletonInstance(); 
     568        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    569569 
    570570        // 現在の商品カテゴリを取得 
     
    595595     */ 
    596596    function removeProductByCategories($category_id, $product_id) { 
    597         $objQuery =& SC_Query::getSingletonInstance(); 
     597        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    598598        $objQuery->delete("dtb_product_categories", 
    599599                          "category_id = ? AND product_id = ?", array($category_id, $product_id)); 
     
    608608     */ 
    609609    function updateProductCategories($arrCategory_id, $product_id) { 
    610         $objQuery =& SC_Query::getSingletonInstance(); 
     610        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    611611 
    612612        // 現在のカテゴリ情報を取得 
     
    643643 
    644644        if($objQuery == NULL) { 
    645             $objQuery =& SC_Query::getSingletonInstance(); 
     645            $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    646646        } 
    647647 
     
    818818     */ 
    819819    function sfGetChildrenArray($table, $pid_name, $id_name, $id) { 
    820         $objQuery =& SC_Query::getSingletonInstance(); 
     820        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    821821        $col = $pid_name . "," . $id_name; 
    822822        $arrData = $objQuery->select($col, $table); 
     
    887887     */ 
    888888    function sfGetParentsArray($table, $pid_name, $id_name, $id) { 
    889         $objQuery =& SC_Query::getSingletonInstance(); 
     889        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    890890        $col = $pid_name . "," . $id_name; 
    891891        $arrData = $objQuery->select($col, $table); 
     
    953953     */ 
    954954    function sfGetIDValueList($table, $keyname, $valname, $where = '', $arrVal = array()) { 
    955         $objQuery =& SC_Query::getSingletonInstance(); 
     955        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    956956        $col = "$keyname, $valname"; 
    957957        $objQuery->setWhere("del_flg = 0"); 
     
    977977     */ 
    978978    function sfRankUp($table, $colname, $id, $andwhere = "") { 
    979         $objQuery =& SC_Query::getSingletonInstance(); 
     979        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    980980        $objQuery->begin(); 
    981981        $where = "$colname = ?"; 
     
    10171017     */ 
    10181018    function sfRankDown($table, $colname, $id, $andwhere = "") { 
    1019         $objQuery =& SC_Query::getSingletonInstance(); 
     1019        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    10201020        $objQuery->begin(); 
    10211021        $where = "$colname = ?"; 
     
    10571057     */ 
    10581058    function sfMoveRank($tableName, $keyIdColumn, $keyId, $pos, $where = "") { 
    1059         $objQuery =& SC_Query::getSingletonInstance(); 
     1059        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    10601060        $objQuery->begin(); 
    10611061 
     
    11221122    function sfDeleteRankRecord($table, $colname, $id, $andwhere = "", 
    11231123                                $delete = false) { 
    1124         $objQuery =& SC_Query::getSingletonInstance(); 
     1124        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    11251125        $objQuery->begin(); 
    11261126        // 削除レコードのランクを取得する。 
     
    12181218     */ 
    12191219    function sfGetDelivFee($pref_id, $product_type_id) { 
    1220         $objQuery =& SC_Query::getSingletonInstance(); 
     1220        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    12211221 
    12221222        /* 
     
    12571257     */ 
    12581258    function sfIsRecord($table, $col, $arrval, $addwhere = "") { 
    1259         $objQuery =& SC_Query::getSingletonInstance(); 
     1259        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    12601260        $arrCol = preg_split("/[, ]/", $col); 
    12611261 
     
    13271327                $this->g_maker_id = array($maker_id); 
    13281328            } else if (SC_Utils_Ex::sfIsInt($product_id) && $product_id != 0 && $this->sfIsRecord("dtb_products","product_id", $product_id, $status)) { 
    1329                 $objQuery =& SC_Query::getSingletonInstance(); 
     1329                $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    13301330                $where = "product_id = ?"; 
    13311331                $maker_id = $objQuery->getCol("maker_id", "dtb_products", "product_id = ?", array($product_id)); 
     
    13491349     */ 
    13501350    function sfGetMakerList($addwhere = "", $products_check = false) { 
    1351         $objQuery =& SC_Query::getSingletonInstance(); 
     1351        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    13521352        $where = "del_flg = 0"; 
    13531353 
     
    14281428    function sfExecSqlByFile($sqlFilePath) { 
    14291429        if (file_exists($sqlFilePath)) { 
    1430             $objQuery =& SC_Query::getSingletonInstance(); 
     1430            $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    14311431 
    14321432            $sqls = file_get_contents($sqlFilePath); 
     
    14501450        if (!SC_Utils_Ex::sfIsInt($product_id)) return false; 
    14511451 
    1452         $objQuery =& SC_Query::getSingletonInstance(); 
     1452        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    14531453        $where = 'product_id = ? AND class_combination_id IS NOT NULL'; 
    14541454        $count = $objQuery->count('dtb_products_class', $where, array($product_id)); 
Note: See TracChangeset for help on using the changeset viewer.