Changeset 15258


Ignore:
Timestamp:
2007/08/09 13:23:14 (13 years ago)
Author:
nanasess
Message:

View 管理用の配列を DB へ移行

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/data/conf/conf.php

    r15164 r15258  
    3030 *  'E_RECOVERABLE_ERROR' => ※PHP5からサポート キャッチできる致命的なエラー。危険なエラーが発生したが、 エンジンが不安定な状態になるほどではないことを表す。 ユーザ定義のハンドラでエラーがキャッチされなかった場合 (set_error_handler() も参照ください) は、 E_ERROR として異常終了する。 
    3131 */ 
    32 error_reporting(E_ALL & ~E_NOTICE); 
    33 //error_reporting(E_ALL); 
     32//error_reporting(E_ALL & ~E_NOTICE); 
     33error_reporting(E_ALL); 
    3434 
    3535if (is_file($CONF_PHP_PATH . "/cache/mtb_constants.php")) { 
     
    3939} 
    4040 
    41 /*--------- ▲View管理用 ---------*/ 
    42  
    43 // ViewのWhere句置換用 
    44 $arrViewWhere = array( 
    45     "&&crscls_where&&" => "", 
    46     "&&crsprdcls_where&&" =>"", 
    47     "&&noncls_where&&" => "", 
    48     "&&allcls_where&&" => "", 
    49     "&&allclsdtl_where&&" => "", 
    50     "&&prdcls_where&&" => "", 
    51     "&&catcnt_where&&" => "" 
    52 ); 
    53  
    54 // View変換用(MySQL対応) 
    55 $arrView = array( 
    56     "vw_cross_class" => ' 
    57         (SELECT T1.class_id AS class_id1, T2.class_id AS class_id2, T1.classcategory_id AS classcategory_id1, T2.classcategory_id AS classcategory_id2, T1.name AS name1, T2.name AS name2, T1.rank AS rank1, T2.rank AS rank2 
    58         FROM dtb_classcategory AS T1, dtb_classcategory AS T2 ) ', 
    59  
    60     "vw_cross_products_class" =>' 
    61         (SELECT T1.class_id1, T1.class_id2, T1.classcategory_id1, T1.classcategory_id2, T2.product_id, 
    62         T1.name1, T1.name2, T2.product_code, T2.stock, T2.price01, T2.price02, T1.rank1, T1.rank2 
    63         FROM (SELECT T1.class_id AS class_id1, T2.class_id AS class_id2, T1.classcategory_id AS classcategory_id1, T2.classcategory_id AS classcategory_id2, T1.name AS name1, T2.name AS name2, T1.rank AS rank1, T2.rank AS rank2 
    64         FROM dtb_classcategory AS T1, dtb_classcategory AS T2 ) AS T1 LEFT JOIN dtb_products_class AS T2 
    65         ON T1.classcategory_id1 = T2.classcategory_id1 AND T1.classcategory_id2 = T2.classcategory_id2) ', 
    66  
    67     "vw_products_nonclass" => ' 
    68         (SELECT 
    69             T1.product_id, 
    70             T1.name, 
    71             T1.deliv_fee, 
    72             T1.sale_limit, 
    73             T1.sale_unlimited, 
    74             T1.category_id, 
    75             T1.rank, 
    76             T1.status, 
    77             T1.product_flag, 
    78             T1.point_rate, 
    79             T1.comment1, 
    80             T1.comment2, 
    81             T1.comment3, 
    82             T1.comment4, 
    83             T1.comment5, 
    84             T1.comment6, 
    85             T1.file1, 
    86             T1.file2, 
    87             T1.file3, 
    88             T1.file4, 
    89             T1.file5, 
    90             T1.file6, 
    91             T1.main_list_comment, 
    92             T1.main_list_image, 
    93             T1.main_comment, 
    94             T1.main_image, 
    95             T1.main_large_image, 
    96             T1.sub_title1, 
    97             T1.sub_comment1, 
    98             T1.sub_image1, 
    99             T1.sub_large_image1, 
    100             T1.sub_title2, 
    101             T1.sub_comment2, 
    102             T1.sub_image2, 
    103             T1.sub_large_image2, 
    104             T1.sub_title3, 
    105             T1.sub_comment3, 
    106             T1.sub_image3, 
    107             T1.sub_large_image3, 
    108             T1.sub_title4, 
    109             T1.sub_comment4, 
    110             T1.sub_image4, 
    111             T1.sub_large_image4, 
    112             T1.sub_title5, 
    113             T1.sub_comment5, 
    114             T1.sub_image5, 
    115             T1.sub_large_image5, 
    116             T1.sub_title6, 
    117             T1.sub_comment6, 
    118             T1.sub_image6, 
    119             T1.sub_large_image6, 
    120             T1.del_flg, 
    121             T1.creator_id, 
    122             T1.create_date, 
    123             T1.update_date, 
    124             T1.deliv_date_id, 
    125             T2.product_id_sub, 
    126             T2.product_code, 
    127             T2.price01, 
    128             T2.price02, 
    129             T2.stock, 
    130             T2.stock_unlimited, 
    131             T2.classcategory_id1, 
    132             T2.classcategory_id2 
    133         FROM (SELECT * FROM dtb_products &&noncls_where&&) AS T1 LEFT JOIN 
    134         (SELECT 
    135         product_id AS product_id_sub, 
    136         product_code, 
    137         price01, 
    138         price02, 
    139         stock, 
    140         stock_unlimited, 
    141         classcategory_id1, 
    142         classcategory_id2 
    143         FROM dtb_products_class WHERE classcategory_id1 = 0 AND classcategory_id2 = 0) 
    144         AS T2 
    145         ON T1.product_id = T2.product_id_sub) ', 
    146  
    147     "vw_products_allclass" => ' 
    148         (SELECT 
    149         product_id, 
    150         product_code_min, 
    151         product_code_max, 
    152         price01_min, 
    153         price01_max, 
    154         price02_min, 
    155         price02_max, 
    156         stock_min, 
    157         stock_max, 
    158         stock_unlimited_min, 
    159         stock_unlimited_max, 
    160         del_flg, 
    161         status, 
    162         name, 
    163         comment1, 
    164         comment2, 
    165         comment3, 
    166         rank, 
    167         main_list_comment, 
    168         main_image, 
    169         main_list_image, 
    170         product_flag, 
    171         deliv_date_id, 
    172         sale_limit, 
    173         point_rate, 
    174         sale_unlimited, 
    175         create_date, 
    176         deliv_fee 
    177         ,(SELECT rank AS category_rank FROM dtb_category AS T4 WHERE T1.category_id = T4.category_id) as category_rank 
    178         ,(SELECT category_id AS sub_category_id FROM dtb_category T4 WHERE T1.category_id = T4.category_id) as category_id 
    179     FROM 
    180         dtb_products AS T1 RIGHT JOIN (SELECT product_id AS product_id_sub, MIN(product_code) AS product_code_min, MAX(product_code) AS product_code_max, MIN(price01) AS price01_min, MAX(price01) AS price01_max, MIN(price02) AS price02_min, MAX(price02) AS price02_max, MIN(stock) AS stock_min, MAX(stock) AS stock_max, MIN(stock_unlimited) AS stock_unlimited_min, MAX(stock_unlimited) AS stock_unlimited_max FROM dtb_products_class GROUP BY product_id) AS T2 ON T1.product_id = T2.product_id_sub 
    181     ) ', 
    182  
    183     "vw_products_allclass_detail" => ' 
    184         (SELECT product_id,price01_min,price01_max,price02_min,price02_max,stock_min,stock_max,stock_unlimited_min,stock_unlimited_max, 
    185         del_flg,status,name,comment1,comment2,comment3,deliv_fee,main_comment,main_image,main_large_image, 
    186         sub_title1,sub_comment1,sub_image1,sub_large_image1, 
    187         sub_title2,sub_comment2,sub_image2,sub_large_image2, 
    188         sub_title3,sub_comment3,sub_image3,sub_large_image3, 
    189         sub_title4,sub_comment4,sub_image4,sub_large_image4, 
    190         sub_title5,sub_comment5,sub_image5,sub_large_image5, 
    191         product_flag,deliv_date_id,sale_limit,point_rate,sale_unlimited,file1,file2,category_id 
    192         FROM ( SELECT * FROM (dtb_products AS T1 RIGHT JOIN 
    193         (SELECT 
    194         product_id AS product_id_sub, 
    195         MIN(price01) AS price01_min, 
    196         MAX(price01) AS price01_max, 
    197         MIN(price02) AS price02_min, 
    198         MAX(price02) AS price02_max, 
    199         MIN(stock) AS stock_min, 
    200         MAX(stock) AS stock_max, 
    201         MIN(stock_unlimited) AS stock_unlimited_min, 
    202         MAX(stock_unlimited) AS stock_unlimited_max 
    203         FROM dtb_products_class GROUP BY product_id) AS T2 
    204         ON T1.product_id = T2.product_id_sub ) ) AS T3 LEFT JOIN (SELECT rank AS category_rank, category_id AS sub_category_id FROM dtb_category) AS T4 
    205         ON T3.category_id = T4.sub_category_id) ', 
    206  
    207     "vw_product_class" => ' 
    208         (SELECT * FROM 
    209         (SELECT T3.product_class_id, T3.product_id AS product_id_sub, classcategory_id1, classcategory_id2, 
    210         T3.rank AS rank1, T4.rank AS rank2, T3.class_id AS class_id1, T4.class_id AS class_id2, 
    211         stock, price01, price02, stock_unlimited, product_code 
    212         FROM ( SELECT 
    213                 T1.product_class_id, 
    214                 T1.product_id, 
    215                 classcategory_id1, 
    216                 classcategory_id2, 
    217                 T2.rank, 
    218                 T2.class_id, 
    219                 stock, 
    220                 price01, 
    221                 price02, 
    222                 stock_unlimited, 
    223                 product_code 
    224          FROM (dtb_products_class AS T1 LEFT JOIN dtb_classcategory AS T2 
    225         ON T1.classcategory_id1 = T2.classcategory_id)) 
    226         AS T3 LEFT JOIN dtb_classcategory AS T4 
    227         ON T3.classcategory_id2 = T4.classcategory_id) AS T5 LEFT JOIN dtb_products AS T6 
    228         ON product_id_sub = T6.product_id) ', 
    229  
    230     "vw_category_count" => ' 
    231         (SELECT T1.category_id, T1.category_name, T1.parent_category_id, T1.level, T1.rank, T2.product_count 
    232         FROM dtb_category AS T1 LEFT JOIN dtb_category_total_count AS T2 
    233         ON T1.category_id = T2.category_id) ' 
    234 ); 
    23541 
    23642?> 
Note: See TracChangeset for help on using the changeset viewer.