Changeset 17552
- Timestamp:
- 2008/08/22 21:02:42 (16 years ago)
- Location:
- branches/comu-ver2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/class/db/dbfactory/SC_DB_DBFactory_MYSQL.php
r17549 r17552 75 75 * @return array 文字コード情報 76 76 */ 77 78 79 80 81 77 function getCharSet() { 78 $objQuery = new SC_Query(); 79 $arrRet = $objQuery->getAll("SHOW VARIABLES LIKE 'char%'"); 80 return $arrRet; 81 } 82 82 83 83 /** -
branches/comu-ver2/data/class/helper/SC_Helper_DB.php
r17549 r17552 55 55 */ 56 56 function sfGetDBVersion($dsn = "") { 57 $dbFactory = SC_DB_DBFactory ::getInstance();57 $dbFactory = SC_DB_DBFactory_Ex::getInstance(); 58 58 return $dbFactory->sfGetDBVersion($dsn); 59 59 } … … 67 67 */ 68 68 function sfTabaleExists($table_name, $dsn = "") { 69 $dbFactory = SC_DB_DBFactory ::getInstance();69 $dbFactory = SC_DB_DBFactory_Ex::getInstance(); 70 70 $dsn = $dbFactory->getDSN($dsn); 71 71 … … 100 100 */ 101 101 function sfColumnExists($table_name, $col_name, $col_type = "", $dsn = "", $add = false) { 102 $dbFactory = SC_DB_DBFactory ::getInstance();102 $dbFactory = SC_DB_DBFactory_Ex::getInstance(); 103 103 $dsn = $dbFactory->getDSN($dsn); 104 104 … … 146 146 */ 147 147 function sfIndexExists($table_name, $col_name, $index_name, $length = "", $dsn = "", $add = false) { 148 $dbFactory = SC_DB_DBFactory ::getInstance();148 $dbFactory = SC_DB_DBFactory_Ex::getInstance(); 149 149 $dsn = $dbFactory->getDSN($dsn); 150 150 … … 180 180 */ 181 181 function sfDataExists($table_name, $where, $arrval, $dsn = "", $sql = "", $add = false) { 182 $dbFactory = SC_DB_DBFactory ::getInstance();182 $dbFactory = SC_DB_DBFactory_Ex::getInstance(); 183 183 $dsn = $dbFactory->getDSN($dsn); 184 184 … … 294 294 $objPage->tpl_total_pretax = 0; // 費用合計(税込み) 295 295 $objPage->tpl_total_tax = 0; // 消費税合計 296 if (USE_POINT !== false) {297 296 $objPage->tpl_total_point = 0; // ポイント合計 298 }299 297 300 298 // カート内情報の取得 … … 400 398 $objPage->tpl_total_tax = $objCartSess->getAllProductsTax($arrInfo); 401 399 // 全商品合計ポイント 402 if (USE_POINT !== false) {403 400 $objPage->tpl_total_point = $objCartSess->getAllProductsPoint(); 404 }405 401 406 402 return $objPage; … … 944 940 // 最下層(level=5)のカテゴリから順に足し合わせていく。 945 941 for ($i = 5; $i >= 1; --$i) { 946 $sql = " INSERT INTO dtb_category_total_count (category_id, product_count, create_date) "; 947 $sql .= " SELECT category_id, SUM(product_count), NOW() "; 948 $sql .= " FROM (SELECT T1.parent_category_id AS category_id, T2.product_count "; 949 $sql .= " FROM dtb_category AS T1, dtb_category_total_count AS T2 "; 950 $sql .= " WHERE T2.category_id = T1.category_id AND T1.level = ? "; 951 $sql .= " UNION ALL SELECT T3.category_id, T4.product_count "; 952 $sql .= " FROM dtb_category AS T3, dtb_category_count AS T4 "; 953 $sql .= " WHERE T4.category_id = T3.category_id AND T3.level = ?) AS T5 "; 954 $sql .= " GROUP BY category_id; "; 955 942 $sql = <<< __EOS__ 943 INSERT INTO dtb_category_total_count (category_id, product_count, create_date) 944 SELECT category_id, SUM(product_count), NOW() 945 FROM 946 ( 947 SELECT T1.parent_category_id AS category_id, T2.product_count 948 FROM dtb_category AS T1, dtb_category_total_count AS T2 949 WHERE T2.category_id = T1.category_id AND T1.level = ? 950 UNION ALL 951 SELECT T3.category_id, T4.product_count 952 FROM dtb_category AS T3, dtb_category_count AS T4 953 WHERE T4.category_id = T3.category_id AND T3.level = ? 954 ) AS T5 955 GROUP BY category_id; 956 __EOS__; 956 957 $objQuery->query($sql, array($i+1, $i)); 957 958 } -
branches/comu-ver2/html/install/index.php
r17477 r17552 762 762 $sql_split = split(";",$sql); 763 763 foreach($sql_split as $key => $val){ 764 echo ' ';764 SC_Utils::sfFlush(); 765 765 if (trim($val) != "") { 766 766 $ret = $objDB->query($val);
Note: See TracChangeset
for help on using the changeset viewer.