Ignore:
Timestamp:
2010/08/06 14:52:59 (10 years ago)
Author:
eccuore
Message:

#792(ダウンロード販売機能) 機能追加

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/html/install/sql/create_view.sql

    r18275 r18777  
    117117        dtb_products.update_date, 
    118118        dtb_products.deliv_date_id, 
     119        dtb_products.down, 
     120        dtb_products.down_filename, 
     121        dtb_products.down_realfilename, 
    119122        T4.product_code_min, 
    120123        T4.product_code_max, 
     
    183186              stock_unlimited, 
    184187              product_code 
    185          FROM (dtb_products_class AS T1  
     188         FROM (dtb_products_class AS T1 
    186189    LEFT JOIN dtb_classcategory AS T2 
    187            ON T1.classcategory_id1 = T2.classcategory_id) AS T3  
     190           ON T1.classcategory_id1 = T2.classcategory_id) AS T3 
    188191  LEFT JOIN dtb_classcategory AS T4 
    189          ON T3.classcategory_id2 = T4.classcategory_id) AS T5  
     192         ON T3.classcategory_id2 = T4.classcategory_id) AS T5 
    190193  LEFT JOIN dtb_products AS T6 
    191194         ON product_id_sub = T6.product_id; 
     
    198201            T1.rank, 
    199202            T2.product_count 
    200        FROM dtb_category AS T1  
     203       FROM dtb_category AS T1 
    201204  LEFT JOIN dtb_category_total_count AS T2 
    202205         ON T1.category_id = T2.category_id 
    203206; 
     207 
     208CREATE VIEW vw_download_class as 
     209     SELECT 
     210          p.product_id AS product_id, 
     211          p.down_realfilename AS down_realfilename, 
     212          p.down_filename AS down_filename, 
     213          od.order_id AS order_id, 
     214          o.customer_id AS customer_id, 
     215          o.commit_date AS commit_date, 
     216          o.status AS status 
     217     FROM 
     218          dtb_products p, 
     219          dtb_order_detail od, 
     220          dtb_order o 
     221     WHERE 
     222          p.product_id = od.product_id AND 
     223          od.order_id = o.order_id; 
Note: See TracChangeset for help on using the changeset viewer.