Monday, April 19, 2010

WorkShop 7

ITC382 Client Server Applications
Tutorial 7

Creating an Online Store II


1. Connect to P200 server and login into MYSQL. Create some tables to be used in conjunction with the online store.

Mysql > use lohky

mysql> create table store_shoppertrack(
id int not null primary key auto_increment,
session_id varchar (32),
sel_item_id int,
sel_item_qty smallint,
sel_item_size varchar (25),
sel_item_color varchar (25),
date_added datetime
);
Query OK, 0 rows affected (0.00 sec)

mysql> create table store_orders (
-> id int not null primary key auto_increment,
-> order_date datetime,
-> order_name varchar (100),
-> order_address varchar (255),
-> order_city varchar (50),
-> order_state char(50),
-> order_zip varchar (10),
-> order_tel varchar (25),
-> order_email varchar (100),
-> item_total float(6,2),
-> shipping_total float (6,2),
-> authorization varchar (50),
-> status enum ('processed', 'pending')
-> );
Query OK, 0 rows affected (0.01 sec)

mysql> create table store_orders_items(
-> id int not null primary key auto_increment,
-> order_id int,
-> sel_item_id int,
-> sel_item_qty smallint,
-> sel_item_size varchar (25),
-> sel_item_color varchar (25),
-> sel_item_price float (6,2)
-> )
-> ;
Query OK, 0 rows affected (0.00 sec)

2. In order for this to work, you will need to have completed the tutorial Online Stores I.

No comments:

Post a Comment