Ignore:
Timestamp:
2011/02/24 17:57:47 (15 years ago)
Author:
nanasess
bzr:base-revision:
svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_5-dev:20380
bzr:committer:
Kentaro Ohkouchi <[email protected]>
bzr:file-ids:

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/pages/admin/total/LC_Page_Admin_Total.php 15600@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fadmin%2Ftotal%2FLC_Page_Admin_Total.php
html/install/sql/create_table_mysql.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Fcreate_table_mysql.sql
html/install/sql/create_table_pgsql.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Fcreate_table_pgsql.sql
html/install/sql/drop_table.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Fdrop_table.sql
bzr:mapping-version:
v4
bzr:merge:

[email protected]
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
[email protected]
bzr:revno:
3109
bzr:revprop:branch-nick:
branches/version-2_5-dev
bzr:root:
branches/version-2_5-dev
bzr:text-revisions:

data/class/db/dbfactory/SC_DB_DBFactory_MYSQL.php [email protected]
data/class/pages/admin/total/LC_Page_Admin_Total.php [email protected]
html/install/sql/create_table_mysql.sql [email protected]
html/install/sql/create_table_pgsql.sql [email protected]
html/install/sql/drop_table.sql [email protected]
bzr:timestamp:
2011-02-24 17:57:43.528000116 +0900
bzr:user-agent:
bzr2.2.1+bzr-svn1.0.4
svn:original-date:
2011-02-24T08:57:43.528000Z
Message:

#793 (非推奨機能の削除)

  • dtb_bat_* テーブル削除
  • r20351 に関連して, MySQL の VIEW 置換関数の削除
Location:
branches/version-2_5-dev/data/class
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/db/dbfactory/SC_DB_DBFactory_MYSQL.php

    r20167 r20381  
    6363        // 改行、タブを1スペースに変換 
    6464        $sql = preg_replace("/[\r\n\t]/"," ",$sql); 
    65         // view表をインラインビューに変換する 
    66         $sql = $this->sfChangeView($sql); 
    6765        // ILIKE検索をLIKE検索に変換する 
    6866        $sql = $this->sfChangeILIKE($sql); 
     
    240238 
    241239    /** 
    242      * View の WHERE 句を置換する. 
    243      * 
    244      * @param string $target 置換対象の文字列 
    245      * @param string $where 置換する文字列 
    246      * @param array $arrval WHERE 句の要素の配列 
    247      * @param string $option SQL 文の追加文字列 
    248      * @return string 置換後の SQL 文 
    249      */ 
    250     function sfViewWhere($target, $where = "", $arrval = array(), $option = ""){ 
    251  
    252         $arrWhere = split("[?]", $where); 
    253         $where_tmp = " WHERE " . $arrWhere[0]; 
    254         for($i = 1; $i < count($arrWhere); $i++){ 
    255             $where_tmp .= SC_Utils_Ex::sfQuoteSmart($arrval[$i - 1]) . $arrWhere[$i]; 
    256         } 
    257         $arrWhere = $this->getWhereConverter(); 
    258         $arrWhere[$target] = $where_tmp . " " . $option; 
    259         return $arrWhere[$target]; 
    260     } 
    261  
    262     /** 
    263      * View をインラインビューに変換する. 
    264      * 
    265      * @access private 
    266      * @param string $sql SQL 文 
    267      * @return string インラインビューに変換した SQL 文 
    268      */ 
    269     function sfChangeView($sql){ 
    270  
    271         $arrViewTmp = $this->viewToSubQuery(); 
    272  
    273             // viewのwhereを変換 
    274         foreach($arrViewTmp as $key => $val){ 
    275             $arrViewTmp[$key] = strtr($arrViewTmp[$key], $this->getWhereConverter()); 
    276         } 
    277  
    278             // viewを変換 
    279         $changesql = strtr($sql, $arrViewTmp); 
    280  
    281         return $changesql; 
    282     } 
    283  
    284     /** 
    285240     * ILIKE句 を LIKE句へ変換する. 
    286241     * 
     
    335290        } 
    336291        return $sql; 
    337     } 
    338  
    339     /** 
    340      * WHERE 句置換用の配列を返す. 
    341      * 
    342      * @access private 
    343      * @return array WHERE 句置換用の配列 
    344      */ 
    345     function getWhereConverter() { 
    346         return array( 
    347             "&&crscls_where&&" => "", 
    348             "&&crsprdcls_where&&" =>"", 
    349             "&&noncls_where&&" => "", 
    350             "&&allcls_where&&" => "", 
    351             "&&allclsdtl_where&&" => "", 
    352             "&&prdcls_where&&" => "", 
    353             "&&catcnt_where&&" => "" 
    354         ); 
    355     } 
    356  
    357     /** 
    358      * View をサブクエリに変換するための配列を返す. 
    359      * 
    360      * @access private 
    361      * @return array View をサブクエリに変換するための配列 
    362      */ 
    363     function viewToSubQuery() { 
    364  
    365         static $sql = array(); 
    366  
    367         if (empty($sql)) { 
    368  
    369  
    370             $sql['vw_products_allclass_detail'] = <<< __EOS__ 
    371                 ( 
    372                     SELECT 
    373                         dtb_products.product_id, 
    374                         dtb_products.name, 
    375                         dtb_products.maker_id, 
    376                         dtb_products.status, 
    377                         dtb_products.comment1, 
    378                         dtb_products.comment2, 
    379                         dtb_products.comment3, 
    380                         dtb_products.comment4, 
    381                         dtb_products.comment5, 
    382                         dtb_products.comment6, 
    383                         dtb_products.note, 
    384                         dtb_products.main_list_comment, 
    385                         dtb_products.main_list_image, 
    386                         dtb_products.main_comment, 
    387                         dtb_products.main_image, 
    388                         dtb_products.main_large_image, 
    389                         dtb_products.sub_title1, 
    390                         dtb_products.sub_comment1, 
    391                         dtb_products.sub_image1, 
    392                         dtb_products.sub_large_image1, 
    393                         dtb_products.sub_title2, 
    394                         dtb_products.sub_comment2, 
    395                         dtb_products.sub_image2, 
    396                         dtb_products.sub_large_image2, 
    397                         dtb_products.sub_title3, 
    398                         dtb_products.sub_comment3, 
    399                         dtb_products.sub_image3, 
    400                         dtb_products.sub_large_image3, 
    401                         dtb_products.sub_title4, 
    402                         dtb_products.sub_comment4, 
    403                         dtb_products.sub_image4, 
    404                         dtb_products.sub_large_image4, 
    405                         dtb_products.sub_title5, 
    406                         dtb_products.sub_comment5, 
    407                         dtb_products.sub_image5, 
    408                         dtb_products.sub_large_image5, 
    409                         dtb_products.sub_title6, 
    410                         dtb_products.sub_comment6, 
    411                         dtb_products.sub_image6, 
    412                         dtb_products.sub_large_image6, 
    413                         dtb_products.del_flg, 
    414                         dtb_products.creator_id, 
    415                         dtb_products.create_date, 
    416                         dtb_products.update_date, 
    417                         dtb_products.deliv_date_id, 
    418                         T4.product_code_min, 
    419                         T4.product_code_max, 
    420                         T4.price01_min, 
    421                         T4.price01_max, 
    422                         T4.price02_min, 
    423                         T4.price02_max, 
    424                         T4.stock_min, 
    425                         T4.stock_max, 
    426                         T4.stock_unlimited_min, 
    427                         T4.stock_unlimited_max, 
    428                         T4.class_count 
    429                     FROM 
    430                         dtb_products 
    431                     JOIN 
    432                             ( 
    433                                 SELECT 
    434                                     product_id, 
    435                                     MIN(product_code) AS product_code_min, 
    436                                     MAX(product_code) AS product_code_max, 
    437                                     MIN(price01) AS price01_min, 
    438                                     MAX(price01) AS price01_max, 
    439                                     MIN(price02) AS price02_min, 
    440                                     MAX(price02) AS price02_max, 
    441                                     MIN(stock) AS stock_min, 
    442                                     MAX(stock) AS stock_max, 
    443                                     MIN(stock_unlimited) AS stock_unlimited_min, 
    444                                     MAX(stock_unlimited) AS stock_unlimited_max, 
    445                                     COUNT(*) as class_count 
    446                                 FROM dtb_products_class 
    447                                 GROUP BY product_id 
    448                             ) AS T4 
    449                             ON dtb_products.product_id = T4.product_id 
    450                 ) 
    451 __EOS__; 
    452  
    453             $sql['vw_products_allclass'] = <<< __EOS__ 
    454                 ( 
    455                     SELECT 
    456                         alldtl.*, 
    457                         dtb_category.rank AS category_rank, 
    458                         T2.category_id, 
    459                         T2.rank AS product_rank 
    460                     FROM 
    461                         {$sql['vw_products_allclass_detail']} AS alldtl 
    462                         LEFT JOIN 
    463                             dtb_product_categories AS T2 
    464                             ON alldtl.product_id = T2.product_id 
    465                         LEFT JOIN 
    466                             dtb_category 
    467                             ON T2.category_id = dtb_category.category_id 
    468                 ) 
    469 __EOS__; 
    470         } 
    471  
    472         return $sql; 
    473  
    474292    } 
    475293 
  • branches/version-2_5-dev/data/class/pages/admin/total/LC_Page_Admin_Total.php

    r20345 r20381  
    2323// {{{ requires 
    2424require_once(CLASS_EX_REALDIR . "page_extends/admin/LC_Page_Admin_Ex.php"); 
    25 require_once(CLASS_EX_REALDIR . "batch_extends/SC_Batch_Daily_Ex.php"); 
    2625require_once(CLASS_REALDIR . "graph/SC_GraphPie.php"); 
    2726require_once(CLASS_REALDIR . "graph/SC_GraphLine.php"); 
Note: See TracChangeset for help on using the changeset viewer.