Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Beginning PHP6, Apache, MySQL Web Development- P19:Welcome to Beginning PHP6, Apache, MySQL Web Development , your new trusty resource for assistance in creating your own dynamic web sites. There are a lot of technologies available that can be used to deliver great web sites, and we ’ re glad you chose the Apache/MySQL/PHP (sometimes referred to simply as AMP) approach. You may or may not have had a taste of these three components in the past, but either way we ’ re confident that you will be impressed with the power that lies within them | Chapter 15 Online Stores The next table you create is called ecomm_orders and contains the main order information Fieldname TyPe Description of What It Stores order_id INTEGER UNSIGNED The individual number assigned to each order. This will auto-increment and is the table s primary key. order_date DATETIME Date the order was placed. customer_id INT 6 The customer ID of the customer who placed the order. This is a foreign key that references ecomm_customers . cost_subtotal DEC 7 2 Subtotal of the order before tax and shipping up to 9 999.99. subtotal_shipping DEC 6 2 Shipping costs for the order up to 999.99. cost_tax DEC 6 2 Tax on the order up to 999.99. cost_total DEC 7 2 Total of the order up to 9999.99. shipping_first_name VARCHAR 20 First name of the shipping contact for this order. shipping_last_name VARCHAR 20 Last name of the shipping contact. shipping_address_1 VARCHAR 50 Shipping contact s address line 1. shipping_address_2 VARCHAR 50 Shipping contact s address line 2 can be left empty . shipping_city VARCHAR 20 Shipping contact s city. shipping_state CHAR 2 Shipping contact s state. shipping_zip_code CHAR 5 Shipping contact s zip code. shipping_phone CHAR 12 Shipping contact s phone number in xxx-xxx-xxxx format . shipping_email VARCHAR 100 Shipping contact s e-mail address. 511 Part II Comic Book Fan Site The fourth table is named ecomm_order_details and contains a detailed list of the products in each order Fieldname Type Description of What It Stores order_id INTEGER UNSIGNED The ID of the order this information belongs to. This is a foreign key that references ecomm_orders . order_qty INTEGER UNSIGNED How many of the item the customer wants. product_code CHAR 5 The product associated with this order. This is a foreign key that references ecomm_products . The fifth and final table is named ecomm_temp_cart and is used to temporarily store the shopping cart s product list while the customer is browsing Fieldname Type Description of What It Stores .