Blogger Information
Blog 19
fans 0
comment 0
visits 10821
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
用户表、商品表、订单表
可乐
Original
1376 people have browsed it

用户表

  1. CREATE TABLE `user` (
  2. `userid` int(15) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户id',
  3. `account` varchar(30) NOT NULL COMMENT '账号名',
  4. `usercode` varchar(30) NOT NULL COMMENT '密码',
  5. `phone` int(30) NOT NULL COMMENT '电话',
  6. `registertime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '注册时间',
  7. `logintime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最后一次登录时间',
  8. PRIMARY KEY (`userid`)
  9. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

商品表

  1. CREATE TABLE `goods` (
  2. `goodsid` int(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '商品id',
  3. `goodscode` varchar(50) COMMENT '商品编码',
  4. `goodsnames` varchar(100) NOT NULL COMMENT '商品名称',
  5. `goodsprice` decimal(30, 3) NOT NULL COMMENT '商品单价',
  6. PRIMARY KEY (`goodsid`)
  7. ) ENGINE = InnoDB CHARSET = utf8;

订单表

  1. CREATE TABLE `order` (
  2. `ordercode` varchar(50) NOT NULL COMMENT '订单编号',
  3. `userid` int(15) NOT NULL COMMENT '用户id',
  4. `goodsid` int(20) UNSIGNED NOT NULL COMMENT '商品id',
  5. `goodsname` varchar(100) NOT NULL COMMENT '商品名称',
  6. `goodsprice` decimal(30, 3) NOT NULL COMMENT '商品单价',
  7. `goodsquantity` int(10) NOT NULL COMMENT '商品数量',
  8. `transport` tinyint(1) NOT NULL DEFAULT '1' COMMENT '运输方式 1冷链物流 0常温物流',
  9. PRIMARY KEY (`ordercode`,`goodsid`)
  10. ) ENGINE = InnoDB CHARSET = utf8;
Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post