- Timestamp:
- 2011/03/04 23:24:33 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/helper/SC_Helper_DB.php
r20487 r20507 79 79 $dsn = $dbFactory->getDSN($dsn); 80 80 81 $objQuery =& SC_Query ::getSingletonInstance($dsn);81 $objQuery =& SC_Query_Ex::getSingletonInstance($dsn); 82 82 83 83 // テーブルが無ければエラー … … 119 119 $dsn = $dbFactory->getDSN($dsn); 120 120 121 $objQuery =& SC_Query ::getSingletonInstance();121 $objQuery =& SC_Query_Ex::getSingletonInstance(); 122 122 $count = $objQuery->count($table_name, $where, $arrval); 123 123 … … 148 148 149 149 if ($force || !isset($data)) { 150 $objQuery =& SC_Query ::getSingletonInstance();150 $objQuery =& SC_Query_Ex::getSingletonInstance(); 151 151 152 152 if ($col === "") { … … 171 171 */ 172 172 function sfGetBasisCount() { 173 $objQuery =& SC_Query ::getSingletonInstance();173 $objQuery =& SC_Query_Ex::getSingletonInstance(); 174 174 175 175 return $objQuery->count("dtb_baseinfo"); … … 182 182 if(!$this->g_root_on) { 183 183 $this->g_root_on = true; 184 $objQuery =& SC_Query ::getSingletonInstance();184 $objQuery =& SC_Query_Ex::getSingletonInstance(); 185 185 186 186 if (!isset($_GET['product_id'])) $_GET['product_id'] = ""; … … 211 211 */ 212 212 function sfGetRollbackPoint($order_id, $use_point, $add_point) { 213 $objQuery = new SC_Query ();213 $objQuery = new SC_Query_Ex(); 214 214 $arrRet = $objQuery->select("customer_id", "dtb_order", "order_id = ?", array($order_id)); 215 215 $customer_id = $arrRet[0]['customer_id']; … … 235 235 */ 236 236 function sfGetCatTree($parent_category_id, $count_check = false) { 237 $objQuery =& SC_Query ::getSingletonInstance();237 $objQuery =& SC_Query_Ex::getSingletonInstance(); 238 238 $col = ""; 239 239 $col .= " cat.category_id,"; … … 303 303 */ 304 304 function sfGetMultiCatTree($product_id, $count_check = false) { 305 $objQuery =& SC_Query ::getSingletonInstance();305 $objQuery =& SC_Query_Ex::getSingletonInstance(); 306 306 $col = ""; 307 307 $col .= " cat.category_id,"; … … 352 352 function sfGetCatCombName($category_id){ 353 353 // 商品が属するカテゴリIDを縦に取得 354 $objQuery =& SC_Query ::getSingletonInstance();354 $objQuery =& SC_Query_Ex::getSingletonInstance(); 355 355 $arrCatID = $this->sfGetParents("dtb_category", "parent_category_id", "category_id", $category_id); 356 356 $ConbName = ""; … … 376 376 */ 377 377 function sfGetCat($category_id){ 378 $objQuery =& SC_Query ::getSingletonInstance();378 $objQuery =& SC_Query_Ex::getSingletonInstance(); 379 379 380 380 // カテゴリーを取得する … … 393 393 function sfGetFirstCat($category_id){ 394 394 // 商品が属するカテゴリIDを縦に取得 395 $objQuery =& SC_Query ::getSingletonInstance();395 $objQuery =& SC_Query_Ex::getSingletonInstance(); 396 396 $arrRet = array(); 397 397 $arrCatID = $this->sfGetParents("dtb_category", "parent_category_id", "category_id", $category_id); … … 417 417 */ 418 418 function sfGetCategoryList($addwhere = "", $products_check = false, $head = CATEGORY_HEAD) { 419 $objQuery =& SC_Query ::getSingletonInstance();419 $objQuery =& SC_Query_Ex::getSingletonInstance(); 420 420 $where = "del_flg = 0"; 421 421 … … 455 455 */ 456 456 function sfGetLevelCatList($parent_zero = true) { 457 $objQuery =& SC_Query ::getSingletonInstance();457 $objQuery =& SC_Query_Ex::getSingletonInstance(); 458 458 459 459 // カテゴリ名リストを取得 … … 512 512 $category_id = array($category_id); 513 513 } 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(); 515 515 $where = "product_id = ?"; 516 516 $category_id = $objQuery->getCol("category_id", "dtb_product_categories", "product_id = ?", array($product_id)); … … 534 534 "product_id" => $product_id); 535 535 536 $objQuery =& SC_Query ::getSingletonInstance();536 $objQuery =& SC_Query_Ex::getSingletonInstance(); 537 537 538 538 // 現在の商品カテゴリを取得 … … 566 566 "product_id" => $product_id); 567 567 568 $objQuery =& SC_Query ::getSingletonInstance();568 $objQuery =& SC_Query_Ex::getSingletonInstance(); 569 569 570 570 // 現在の商品カテゴリを取得 … … 595 595 */ 596 596 function removeProductByCategories($category_id, $product_id) { 597 $objQuery =& SC_Query ::getSingletonInstance();597 $objQuery =& SC_Query_Ex::getSingletonInstance(); 598 598 $objQuery->delete("dtb_product_categories", 599 599 "category_id = ? AND product_id = ?", array($category_id, $product_id)); … … 608 608 */ 609 609 function updateProductCategories($arrCategory_id, $product_id) { 610 $objQuery =& SC_Query ::getSingletonInstance();610 $objQuery =& SC_Query_Ex::getSingletonInstance(); 611 611 612 612 // 現在のカテゴリ情報を取得 … … 643 643 644 644 if($objQuery == NULL) { 645 $objQuery =& SC_Query ::getSingletonInstance();645 $objQuery =& SC_Query_Ex::getSingletonInstance(); 646 646 } 647 647 … … 818 818 */ 819 819 function sfGetChildrenArray($table, $pid_name, $id_name, $id) { 820 $objQuery =& SC_Query ::getSingletonInstance();820 $objQuery =& SC_Query_Ex::getSingletonInstance(); 821 821 $col = $pid_name . "," . $id_name; 822 822 $arrData = $objQuery->select($col, $table); … … 887 887 */ 888 888 function sfGetParentsArray($table, $pid_name, $id_name, $id) { 889 $objQuery =& SC_Query ::getSingletonInstance();889 $objQuery =& SC_Query_Ex::getSingletonInstance(); 890 890 $col = $pid_name . "," . $id_name; 891 891 $arrData = $objQuery->select($col, $table); … … 953 953 */ 954 954 function sfGetIDValueList($table, $keyname, $valname, $where = '', $arrVal = array()) { 955 $objQuery =& SC_Query ::getSingletonInstance();955 $objQuery =& SC_Query_Ex::getSingletonInstance(); 956 956 $col = "$keyname, $valname"; 957 957 $objQuery->setWhere("del_flg = 0"); … … 977 977 */ 978 978 function sfRankUp($table, $colname, $id, $andwhere = "") { 979 $objQuery =& SC_Query ::getSingletonInstance();979 $objQuery =& SC_Query_Ex::getSingletonInstance(); 980 980 $objQuery->begin(); 981 981 $where = "$colname = ?"; … … 1017 1017 */ 1018 1018 function sfRankDown($table, $colname, $id, $andwhere = "") { 1019 $objQuery =& SC_Query ::getSingletonInstance();1019 $objQuery =& SC_Query_Ex::getSingletonInstance(); 1020 1020 $objQuery->begin(); 1021 1021 $where = "$colname = ?"; … … 1057 1057 */ 1058 1058 function sfMoveRank($tableName, $keyIdColumn, $keyId, $pos, $where = "") { 1059 $objQuery =& SC_Query ::getSingletonInstance();1059 $objQuery =& SC_Query_Ex::getSingletonInstance(); 1060 1060 $objQuery->begin(); 1061 1061 … … 1122 1122 function sfDeleteRankRecord($table, $colname, $id, $andwhere = "", 1123 1123 $delete = false) { 1124 $objQuery =& SC_Query ::getSingletonInstance();1124 $objQuery =& SC_Query_Ex::getSingletonInstance(); 1125 1125 $objQuery->begin(); 1126 1126 // 削除レコードのランクを取得する。 … … 1218 1218 */ 1219 1219 function sfGetDelivFee($pref_id, $product_type_id) { 1220 $objQuery =& SC_Query ::getSingletonInstance();1220 $objQuery =& SC_Query_Ex::getSingletonInstance(); 1221 1221 1222 1222 /* … … 1257 1257 */ 1258 1258 function sfIsRecord($table, $col, $arrval, $addwhere = "") { 1259 $objQuery =& SC_Query ::getSingletonInstance();1259 $objQuery =& SC_Query_Ex::getSingletonInstance(); 1260 1260 $arrCol = preg_split("/[, ]/", $col); 1261 1261 … … 1327 1327 $this->g_maker_id = array($maker_id); 1328 1328 } 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(); 1330 1330 $where = "product_id = ?"; 1331 1331 $maker_id = $objQuery->getCol("maker_id", "dtb_products", "product_id = ?", array($product_id)); … … 1349 1349 */ 1350 1350 function sfGetMakerList($addwhere = "", $products_check = false) { 1351 $objQuery =& SC_Query ::getSingletonInstance();1351 $objQuery =& SC_Query_Ex::getSingletonInstance(); 1352 1352 $where = "del_flg = 0"; 1353 1353 … … 1428 1428 function sfExecSqlByFile($sqlFilePath) { 1429 1429 if (file_exists($sqlFilePath)) { 1430 $objQuery =& SC_Query ::getSingletonInstance();1430 $objQuery =& SC_Query_Ex::getSingletonInstance(); 1431 1431 1432 1432 $sqls = file_get_contents($sqlFilePath); … … 1450 1450 if (!SC_Utils_Ex::sfIsInt($product_id)) return false; 1451 1451 1452 $objQuery =& SC_Query ::getSingletonInstance();1452 $objQuery =& SC_Query_Ex::getSingletonInstance(); 1453 1453 $where = 'product_id = ? AND class_combination_id IS NOT NULL'; 1454 1454 $count = $objQuery->count('dtb_products_class', $where, array($product_id));
Note: See TracChangeset
for help on using the changeset viewer.