- Timestamp:
- 2010/08/12 19:33:49 (14 years ago)
- bzr:base-revision:
- svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_5-dev:18783
- bzr:committer:
- Kentaro Ohkouchi <ohkouchi@loop-az.jp>
- bzr:file-ids:
data/class/SC_Query.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2FSC_Query.php
data/class/db/dbfactory/SC_DB_DBFactory_MYSQL.php 15123@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fdb%2Fdbfactory%2FSC_DB_DBFactory_MYSQL.php
data/class/db/dbfactory/SC_DB_DBFactory_PGSQL.php 15123@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fdb%2Fdbfactory%2FSC_DB_DBFactory_PGSQL.php
data/class/helper/SC_Helper_DB.php 15176@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fhelper%2FSC_Helper_DB.php- bzr:mapping-version:
- v4
- bzr:repository-uuid:
- 1e3b908f-19a9-db11-a64c-001125224ba8
- bzr:revision-id:
- ohkouchi@loop-az.jp-20100812103342-5fc7rp06997dbg6e
- bzr:revno:
- 2267
- bzr:revprop:branch-nick:
- branches/version-2_5-dev
- bzr:root:
- branches/version-2_5-dev
- bzr:text-parents:
data/class/SC_Query.php ohkouchi@loop-az.jp-20100804045224-nsulc26bh1ttqfrb
data/class/db/dbfactory/SC_DB_DBFactory_MYSQL.php svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_5-dev:18777
data/class/db/dbfactory/SC_DB_DBFactory_PGSQL.php ohkouchi@loop-az.jp-20100804045224-nsulc26bh1ttqfrb
data/class/helper/SC_Helper_DB.php svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_5-dev:18777- bzr:timestamp:
- 2010-08-12 19:33:42.628999949 +0900
- bzr:user-agent:
- bzr2.1.2+bzr-svn1.0.2
- svn:original-date:
- 2010-08-12T10:33:42.629000Z
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/helper/SC_Helper_DB.php
r18777 r18784 70 70 $dsn = $dbFactory->getDSN($dsn); 71 71 72 $objQuery = new SC_Query($dsn, true, true);72 $objQuery =& SC_Query::getSingletonInstance(); 73 73 // 正常に接続されている場合 74 74 if(!$objQuery->isError()) { … … 109 109 if(!$this->sfTabaleExists($table_name, $dsn)) return false; 110 110 111 $objQuery = new SC_Query($dsn, true, true);111 $objQuery =& SC_Query::getSingletonInstance(); 112 112 // 正常に接続されている場合 113 113 if(!$objQuery->isError()) { … … 155 155 if (!$this->sfTabaleExists($table_name, $dsn)) return false; 156 156 157 $objQuery = new SC_Query($dsn, true, true);157 $objQuery =& SC_Query::getSingletonInstance(); 158 158 $arrRet = $dbFactory->getTableIndex($index_name, $table_name); 159 159 … … 186 186 $dsn = $dbFactory->getDSN($dsn); 187 187 188 $objQuery = new SC_Query($dsn, true, true);188 $objQuery =& SC_Query::getSingletonInstance(); 189 189 $count = $objQuery->count($table_name, $where, $arrval); 190 190 … … 211 211 212 212 if ($force || !isset($data)) { 213 $objQuery = new SC_Query();213 $objQuery =& SC_Query::getSingletonInstance(); 214 214 $arrRet = $objQuery->select('*', 'dtb_baseinfo'); 215 215 … … 229 229 if(!$this->g_root_on) { 230 230 $this->g_root_on = true; 231 $objQuery = new SC_Query();231 $objQuery =& SC_Query::getSingletonInstance(); 232 232 233 233 if (!isset($_GET['product_id'])) $_GET['product_id'] = ""; … … 267 267 268 268 // 商品規格取得 269 $objQuery = new SC_Query();269 $objQuery =& SC_Query::getSingletonInstance(); 270 270 $col = 'product_id, deliv_fee, name, product_code, main_list_image, main_image, price01, price02, point_rate, product_class_id, classcategory_id1, classcategory_id2, class_id1, class_id2, stock, stock_unlimited, sale_limit'; 271 271 $table = 'vw_product_class AS prdcls'; … … 284 284 */ 285 285 function sfGetPayment() { 286 $objQuery = new SC_Query();286 $objQuery =& SC_Query::getSingletonInstance(); 287 287 // 購入金額が条件額以下の項目を取得 288 288 $where = "del_flg = 0"; … … 430 430 if($uniqid != "") { 431 431 // 既存データのチェック 432 $objQuery = new SC_Query();432 $objQuery =& SC_Query::getSingletonInstance(); 433 433 $where = "order_temp_id = ?"; 434 434 $cnt = $objQuery->count("dtb_order_temp", $where, array($uniqid)); … … 501 501 */ 502 502 function sfEditCustomerData($array, $arrRegistColumn) { 503 $objQuery = new SC_Query();503 $objQuery =& SC_Query::getSingletonInstance(); 504 504 505 505 foreach ($arrRegistColumn as $data) { … … 535 535 */ 536 536 function sfGetCustomerPoint($order_id, $use_point, $add_point) { 537 $objQuery = new SC_Query();537 $objQuery =& SC_Query::getSingletonInstance(); 538 538 $arrRet = $objQuery->select("customer_id", "dtb_order", "order_id = ?", array($order_id)); 539 539 $customer_id = $arrRet[0]['customer_id']; … … 563 563 */ 564 564 function sfGetCustomerPointFromCid($customer_id, $use_point, $add_point) { 565 $objQuery = new SC_Query();565 $objQuery =& SC_Query::getSingletonInstance(); 566 566 if (USE_POINT !== false) { 567 567 $arrRet = $objQuery->select("point", "dtb_customer", "customer_id = ?", array($customer_id)); … … 582 582 */ 583 583 function sfGetCatTree($parent_category_id, $count_check = false) { 584 $objQuery = new SC_Query();584 $objQuery =& SC_Query::getSingletonInstance(); 585 585 $col = ""; 586 586 $col .= " cat.category_id,"; … … 626 626 */ 627 627 function sfGetMultiCatTree($product_id, $count_check = false) { 628 $objQuery = new SC_Query();628 $objQuery =& SC_Query::getSingletonInstance(); 629 629 $col = ""; 630 630 $col .= " cat.category_id,"; … … 675 675 function sfGetCatCombName($category_id){ 676 676 // 商品が属するカテゴリIDを縦に取得 677 $objQuery = new SC_Query();677 $objQuery =& SC_Query::getSingletonInstance(); 678 678 $arrCatID = $this->sfGetParents($objQuery, "dtb_category", "parent_category_id", "category_id", $category_id); 679 679 $ConbName = ""; … … 699 699 */ 700 700 function sfGetCat($category_id){ 701 $objQuery = new SC_Query();701 $objQuery =& SC_Query::getSingletonInstance(); 702 702 703 703 // カテゴリーを取得する … … 716 716 function sfGetFirstCat($category_id){ 717 717 // 商品が属するカテゴリIDを縦に取得 718 $objQuery = new SC_Query();718 $objQuery =& SC_Query::getSingletonInstance(); 719 719 $arrRet = array(); 720 720 $arrCatID = $this->sfGetParents($objQuery, "dtb_category", "parent_category_id", "category_id", $category_id); … … 740 740 */ 741 741 function sfGetCategoryList($addwhere = "", $products_check = false, $head = CATEGORY_HEAD) { 742 $objQuery = new SC_Query();742 $objQuery =& SC_Query::getSingletonInstance(); 743 743 $where = "del_flg = 0"; 744 744 … … 778 778 */ 779 779 function sfGetLevelCatList($parent_zero = true) { 780 $objQuery = new SC_Query();780 $objQuery =& SC_Query::getSingletonInstance(); 781 781 782 782 // カテゴリ名リストを取得 … … 838 838 $this->g_category_id = array($category_id); 839 839 } else if (SC_Utils_Ex::sfIsInt($product_id) && $product_id != 0 && $this->sfIsRecord("dtb_products","product_id", $product_id, $status)) { 840 $objQuery = new SC_Query();840 $objQuery =& SC_Query::getSingletonInstance(); 841 841 $where = "product_id = ?"; 842 842 $category_id = $objQuery->getCol("dtb_product_categories", "category_id", "product_id = ?", array($product_id)); … … 862 862 "product_id" => $product_id); 863 863 864 $objQuery = new SC_Query();864 $objQuery =& SC_Query::getSingletonInstance(); 865 865 866 866 // 現在の商品カテゴリを取得 … … 894 894 "product_id" => $product_id); 895 895 896 $objQuery = new SC_Query();896 $objQuery =& SC_Query::getSingletonInstance(); 897 897 898 898 // 現在の商品カテゴリを取得 … … 925 925 $sqlval = array("category_id" => $category_id, 926 926 "product_id" => $product_id); 927 $objQuery = new SC_Query();927 $objQuery =& SC_Query::getSingletonInstance(); 928 928 $objQuery->delete("dtb_product_categories", 929 929 "category_id = ? AND product_id = ?", $sqlval); … … 938 938 */ 939 939 function updateProductCategories($arrCategory_id, $product_id) { 940 $objQuery = new SC_Query();940 $objQuery =& SC_Query::getSingletonInstance(); 941 941 942 942 // 現在のカテゴリ情報を取得 … … 1051 1051 */ 1052 1052 function sfGetChildrenArray($table, $pid_name, $id_name, $id) { 1053 $objQuery = new SC_Query();1053 $objQuery =& SC_Query::getSingletonInstance(); 1054 1054 $col = $pid_name . "," . $id_name; 1055 1055 $arrData = $objQuery->select($col, $table); … … 1120 1120 */ 1121 1121 function sfGetParentsArray($table, $pid_name, $id_name, $id) { 1122 $objQuery = new SC_Query();1122 $objQuery =& SC_Query::getSingletonInstance(); 1123 1123 $col = $pid_name . "," . $id_name; 1124 1124 $arrData = $objQuery->select($col, $table); … … 1169 1169 */ 1170 1170 function sfGetOrderTemp($order_temp_id) { 1171 $objQuery = new SC_Query();1171 $objQuery =& SC_Query::getSingletonInstance(); 1172 1172 $where = "order_temp_id = ?"; 1173 1173 $arrRet = $objQuery->select("*", "dtb_order_temp", $where, array($order_temp_id)); … … 1184 1184 */ 1185 1185 function sfGetIDValueList($table, $keyname, $valname) { 1186 $objQuery = new SC_Query();1186 $objQuery =& SC_Query::getSingletonInstance(); 1187 1187 $col = "$keyname, $valname"; 1188 1188 $objQuery->setWhere("del_flg = 0"); … … 1208 1208 */ 1209 1209 function sfRankUp($table, $colname, $id, $andwhere = "") { 1210 $objQuery = new SC_Query();1210 $objQuery =& SC_Query::getSingletonInstance(); 1211 1211 $objQuery->begin(); 1212 1212 $where = "$colname = ?"; … … 1248 1248 */ 1249 1249 function sfRankDown($table, $colname, $id, $andwhere = "") { 1250 $objQuery = new SC_Query();1250 $objQuery =& SC_Query::getSingletonInstance(); 1251 1251 $objQuery->begin(); 1252 1252 $where = "$colname = ?"; … … 1288 1288 */ 1289 1289 function sfMoveRank($tableName, $keyIdColumn, $keyId, $pos, $where = "") { 1290 $objQuery = new SC_Query();1290 $objQuery =& SC_Query::getSingletonInstance(); 1291 1291 $objQuery->begin(); 1292 1292 … … 1353 1353 function sfDeleteRankRecord($table, $colname, $id, $andwhere = "", 1354 1354 $delete = false) { 1355 $objQuery = new SC_Query();1355 $objQuery =& SC_Query::getSingletonInstance(); 1356 1356 $objQuery->begin(); 1357 1357 // 削除レコードのランクを取得する。 … … 1449 1449 */ 1450 1450 function sfGetDelivTime($payment_id = "") { 1451 $objQuery = new SC_Query();1451 $objQuery =& SC_Query::getSingletonInstance(); 1452 1452 1453 1453 $deliv_id = ""; … … 1479 1479 $payment_id = isset($arrData['payment_id']) ? $arrData['payment_id'] : ""; 1480 1480 1481 $objQuery = new SC_Query();1481 $objQuery =& SC_Query::getSingletonInstance(); 1482 1482 1483 1483 $deliv_id = ""; … … 1505 1505 } 1506 1506 1507 $objQuery = new SC_Query();1507 $objQuery =& SC_Query::getSingletonInstance(); 1508 1508 $where = "deliv_id = ? AND pref = ?"; 1509 1509 $arrRet= $objQuery->select("fee", "dtb_delivfee", $where, array($deliv_id, $pref)); … … 1611 1611 */ 1612 1612 function sfIsRecord($table, $col, $arrval, $addwhere = "") { 1613 $objQuery = new SC_Query();1613 $objQuery =& SC_Query::getSingletonInstance(); 1614 1614 $arrCol = split("[, ]", $col); 1615 1615 … … 1681 1681 $this->g_maker_id = array($maker_id); 1682 1682 } else if (SC_Utils_Ex::sfIsInt($product_id) && $product_id != 0 && $this->sfIsRecord("dtb_products","product_id", $product_id, $status)) { 1683 $objQuery = new SC_Query();1683 $objQuery =& SC_Query::getSingletonInstance(); 1684 1684 $where = "product_id = ?"; 1685 1685 $maker_id = $objQuery->getCol("dtb_products", "maker_id", "product_id = ?", array($product_id)); … … 1703 1703 */ 1704 1704 function sfGetMakerList($addwhere = "", $products_check = false) { 1705 $objQuery = new SC_Query();1705 $objQuery =& SC_Query::getSingletonInstance(); 1706 1706 $where = "del_flg = 0"; 1707 1707 … … 1743 1743 */ 1744 1744 function lfCalcAllProductsDelivFee(&$arrData, &$objCartSess) { 1745 $objQuery = new SC_Query();1745 $objQuery =& SC_Query::getSingletonInstance(); 1746 1746 $deliv_fee_total = 0; 1747 1747 $max = $objCartSess->getMax(); … … 1774 1774 */ 1775 1775 function sfUpdateOrderNameCol($order_id, $temp_table = false) { 1776 $objQuery = new SC_Query();1776 $objQuery =& SC_Query::getSingletonInstance(); 1777 1777 1778 1778 if ($temp_table) { … … 1848 1848 */ 1849 1849 function sfUpdateOrderStatus($orderId, $newStatus = null, $newAddPoint = null, $newUsePoint = null) { 1850 $objQuery = new SC_Query();1850 $objQuery =& SC_Query::getSingletonInstance(); 1851 1851 1852 1852 $arrOrderOld = $objQuery->getRow('dtb_order', 'status, add_point, use_point, customer_id', 'order_id = ?', array($orderId)); … … 1955 1955 function sfExecSqlByFile($sqlFilePath) { 1956 1956 if (file_exists($sqlFilePath)) { 1957 $objQuery = new SC_Query();1957 $objQuery =& SC_Query::getSingletonInstance(); 1958 1958 1959 1959 $sqls = file_get_contents($sqlFilePath); … … 1981 1981 if (!SC_Utils_Ex::sfIsInt($product_id)) return false; 1982 1982 1983 $objQuery = new SC_Query();1983 $objQuery =& SC_Query::getSingletonInstance(); 1984 1984 $where = 'product_id = ? AND (classcategory_id1 <> 0 OR classcategory_id2 <> 0)'; 1985 1985 $count = $objQuery->count('dtb_products_class', $where, array($product_id)); … … 1994 1994 */ 1995 1995 function chkCartDown($objCartSess) { 1996 $objQuery = new SC_Query();1996 $objQuery =& SC_Query::getSingletonInstance(); 1997 1997 $down = false; 1998 1998 $nodown = false;
Note: See TracChangeset
for help on using the changeset viewer.