Php shopping cart instance (15 ). The php shopping cart instance provides a php shopping cart instance code, which is a development instance suitable for the development of the mall or shopping system reference, it tells you that if you add a commodity to the shopping php shopping cart instance, here we provide a php shopping cart instance code, which is a development instance suitable for the development of the mall or shopping system reference, it tells you to design an instance with the database of the shopping cart if you add the item to the shopping and delete it.
Create table inventory (
Product tinytext not null,
Quantity tinytext not null,
Id int (4) default '0' not null auto_increment,
Description tinytext not null,
Price float (10, 2) default '0. 00' not null,
Category char (1) default ''not null,
Key id (id ),
Primary key (id ),
Key price (price)
);
Insert into inventory values ('Hard disk ', '5', '1', '80 GB', '123', '1 ');
Insert into inventory values ('CPU ', '12', '2', 'p4-2.4g', '123', '1 ');
Insert into inventory values ('DVD-rom ', '7', '3', '12x', '123', '1 ');
Insert into inventory values ('mainboard ', '3', '4', 'ASUS', '123', '2 ');
Insert into inventory values ('dashboard ', '6', '5', '64m', '123', '1 ');
Insert into inventory values ('recorders ', '4', '6', '52w', '123', '1 ');
Shoping table
Create table shopping (
Session tinytext not null,
Product tinytext not null,
Quantity tinytext not null,
Card tinytext not null,
Id int (4) default '0' not null auto_increment,
Key id (id ),
Primary key (id)
);
Shoper table
Create database shopper;
Use shopper;
Create table shopping (
Session tinytext not null,
Product tinytext not null,
Quantity tinytext not null,
Card tinytext not null,
Id int (4) default '0' not null auto_increment,
Key id (id ),
Primary key (id)
);
Create table inventory (
Product tinytext not null,
Quantity tinytext not null,
Id int (4) default '0' not null auto_increment,
Description tinytext not null,
Price float (10, 2) default '0. 00' not null,
Category char (1) default ''not null,
Key id (id ),
Primary key (id ),
Key price (price)
);
Insert into inventory values ('Hard disk ', '5', '1', '80 GB', '123', '1 ');
Insert into inventory values ('CPU ', '12', '2', 'p4-2.4g', '123', '1 ');
Insert into inventory values ('DVD-rom ', '7', '3', '12x', '123', '1 ');
Insert into inventory values ('mainboard ', '3', '4', 'ASUS', '123', '2 ');
Insert into inventory values ('dashboard ', '6', '5', '64m', '123', '1 ');
Insert into inventory values ('recorders ', '4', '6', '52w', '123', '1 ');
*/
...