为了账号安全,请及时绑定邮箱和手机立即绑定

创建表的代码,调了半天终于能用了

create database if not exists shopImooc;

use shopImooc;

drop table if exists imooc_admin;

create table imooc_admin(

id tinyint unsigned auto_increment key,

username varchar(20) not null unique,

password char(32) not null,

email varchar(50) not null

);

drop table if exists imooc_cate;

create table imooc_cate(

id smallint unsigned auto_increment key,

cName varchar(50) unique

);

drop table if exists imooc_pro;

create table imooc_pro(

id int unsigned auto_increment key,

pName varchar(50) not null unique,

pSn varchar(50) not null,

pNum int unsigned default 1,

mPrice decimal(10,2) not null,

iPrice decimal(10,2) not null,

pDesc text,

pImg varchar(50) not null,

pubTime int unsigned not null,

isShow tinyint(1) default 1,

isHot tinyint(1) default 0,

cId smallint unsigned not null

);

drop table if exists imooc_user;

create table imooc_user(

id int unsigned auto_increment key,

username varchar(20) not null unique,

password char(32) not null,

sex enum('男','女','保密') not null default '保密',

face varchar(50) not null,

regTime int unsigned not null

);

drop table if exists imooc_album;

create table imooc_album(

id int unsigned auto_increment key,

pid int unsigned not null,

albumPath varchar(50) not null

);


正在回答

1 回答

不用加单引号吗?

1 回复 有任何疑惑可以回复我~
#1

qq_喵喵喵_0 提问者

老师不是加的单引号,是加的tab上面那个符号
2015-08-18 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
手把手教你实现电商网站后台开发
  • 参与学习       117273    人
  • 解答问题       1999    个

手把手教你用PHP搭建电子商务平台,由浅入深教你搭建电商系统

进入课程

创建表的代码,调了半天终于能用了

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号