程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 網頁編程 >> PHP編程 >> 關於PHP編程 >> php購物車實例(1/5)

php購物車實例(1/5)

編輯:關於PHP編程

php購物車實例這裡又提供一款php購物車實例代碼,這是一款適合種位要開發商城或購物系統參考的開發實例了,告訴你如果增加商品到購物並刪除,與購物車的數據庫設計實例。

php教程購物車實例
這裡又提供一款php購物車實例代碼,這是一款適合種位要開發商城或購物系統參考的開發實例了,告訴你如果增加商品到購物並刪除,與購物車的數據庫教程設計實例。
inventory表

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 ('硬盤','5','1','80g','5600','1');
insert into inventory values ('cpu','12','2','p4-2.4g','6600','1');
insert into inventory values ('dvd-rom','7','3','12x','2000','1');
insert into inventory values ('主板','3','4','asus','5000','2');
insert into inventory values ('顯示卡','6','5','64m','4500','1');
insert into inventory values ('刻錄機','4','6','52w','3000','1');

shoping表

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表

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 ('硬盤','5','1','80g','5600','1');
insert into inventory values ('cpu','12','2','p4-2.4g','6600','1');
insert into inventory values ('dvd-rom','7','3','12x','2000','1');
insert into inventory values ('主板','3','4','asus','5000','2');
insert into inventory values ('顯示卡','6','5','64m','4500','1');
insert into inventory values ('刻錄機','4','6','52w','3000','1');
*/

1 2 3 4 5

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved