?????? ??
1,new建數(shù)據(jù)庫(kù)onecms
CREATE DATABASE onecms;
2,new建goods表:
CREATE TABLE ??(
id int(11) ?? ? auto_increment? null? ??,
goodstypeid int(11) NOT NULL,
goodstypefid int(11) NOT NULL,
goodstypefstr varchar(33) NOT NULL,
title varchar(255) NOT NULL,
flag varchar(33) NOT NULL,
marketprice int(11) NOT NULL,
salesprice int(11) NOT NULL,
housenum int(11) NOT NULL,
content VARCHAR(255) NOT NULL,
picurl varchar(255) NOT NULL,
hits int(11),
orderid int(11),
checkinfo smallint(1),
delstate smallint(1))ENGINE=InnoDB DEFAULT CHARSET=utf8;
3, New建goodstype表
CREATE TABLE ?? ??(
id int(11) ?? null ?? ? auto_increment,
fid int(11) NOT NULL,
classname varchar(255) NOT NULL,
orderid int(11) NOT NULL,
checkinfo int(11) NULL ??,
fstr VARCHAR(33) NOT NULL)
ENGINE=InnoDB DEFAULT CHARSET=utf8;
4,插入測(cè)試數(shù)據(jù)
??表插入數(shù)據(jù):
INSERT INTO `??` VALUES('1', '2', '0', '0,2,', 'Huawei mobilephone', '', '1000', '800', '1', ' Huawei P10Plus', './uploads/c2922d7d93043572a95bd8b5289a41b.png', '18', '1', '1', '0');
INSERT INTO `??` VALUES('2', '4', ' 3', '0,3,4,', '?? ??', '', '1000', '888', '0', '?? ? ?? ??', './uploads/1397f1630770e4cc2d407c1911c2ecc.png', '3' , '2', '1', '0');
INSERT INTO `goods` VALUES ('3', '1', '0', '0,1,', 'Notebook' , '' , '3800', '3666', '0', 'Lenovo thinkpad ???', './uploads/fd9ecdaf3ee9a9035f51da6471e3f90.png', '2', '3', '1', '0');
goodstype ???? ??? ??:
INSERT INTO `goodstype` VALUES ('1', '0', 'Computer', '1', '1', '0,');
INSERT INTO `goodstype` VALUES('2', '0', '???', '2', '1', '0,');
INSERT INTO `goodstype` VALUES('3 ', '0', '?', '3', '0', '0,');
INSERT INTO `goodstype` VALUES ('4', '3', '?? ??', '4 ', '1', '0,3,');