【SQL开源代码栏目提醒】:网学会员--在 SQL开源代码编辑为广大网友搜集整理了:product_backup.sql绩等信息,祝愿广大网友取得需要的信息,参考学习。
/*
SQLyog v3.71
Host - localhost : Database - product
**************************************************************
Server version 4.1.7-nt
*/
create database if not exists `product`;
use `product`;
/*
Table structure for buylog
*/
drop table if exists `buylog`;
CREATE TABLE `buylog` (
`id` int(6) NOT NULL auto_increment,
`user` varchar(20) NOT NULL default '',
`productid` int(6) NOT NULL default '0',
`amount` int(6) NOT NULL default '0',
`buyprice` decimal(9,2) NOT NULL default '0.00',
`cost` decimal(9,2) NOT NULL default '0.00',
`ip` varchar(20) default NULL,
`buytime` datetime NOT NULL default '0000-00-00 00:00:00',
`other` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*
Table data for product.buylog
*/
INSERT INTO `buylog` VALUES
(1,'1',1,20,100.00,2000.00,'127.0.0.1','2005-01-13 15:03:09',''),
(3,'1',3,33,50.00,1650.00,'127.0.0.1','2005-01-13 15:24:16',''),
(4,'1',2,27,89.00,2403.00,'127.0.0.1','2005-01-13 15:56:46',''),
(5,'1',4,50,20.00,1000.00,'127.0.0.1','2005-01-13 15:56:58','');
/*
Table structure for company
*/
drop table if exists `company`;
CREATE TABLE `company` (
`id` int(6) NOT NULL auto_increment,
`name` varchar(100) NOT NULL default '',
`address` varchar(255) NOT NULL default '',
`tel` varchar(100) NOT NULL default '',
`linkman` varchar(100) NOT NULL default '',
`product` varchar(255) default NULL,
`addtime` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*
Table data for product.company
*/
INSERT INTO `company` VALUES
(1,'北京ABC公司','北京海淀区科路50号','01045978954','王先生 wang','','2005-01-12 20:37:52'),
(2,'上海XXX公司','上海市松花路80号','02185568463','张小姐,Miss zhang','','2005-01-12 20:42:24'),
(3,'Good KL','New York','541387512','Miss Mary','No','2005-01-12 22:43:09'),
(4,'华泰集团','深圳龙岗','07552322654','李琼','','2005-01-12 22:49:32');
/*
Table structure for product
*/
drop table if exists `product`;
CREATE TABLE `product` (
`productid` int(6) NOT NULL auto_increment,
`companyid` int(6) NOT NULL default '0',
`name` varchar(50) NOT NULL default '',
`brand` varchar(50) NOT NULL default '',
`type` varchar(50) NOT NULL default '',
`introduction` text,
`other` text,
PRIMARY KEY (`productid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*
Table data for product.product
*/
INSERT INTO `product` VALUES
(1,1,'办公桌','琪好','大号','不错',''),
(2,2,'地板砖','永久','XZ81','美观耐用!',''),
(3,1,'隔板','Y78','布面','各式各样都有',''),
(4,4,'太阳帽','遮光','白色','防紫外线','');
/*
Table structure for selllog
*/
drop table if exists `selllog`;
CREATE TABLE `selllog` (
`id` int(10) NOT NULL auto_increment,
`user` varchar(20) NOT NULL default '',
`productid` int(6) NOT NULL default '0',
`amount` int(6) NOT NULL default '0',
`buyprice` decimal(9,2) NOT NULL default '0.00',
`sellprice` decimal(9,2) NOT NULL default '0.00',
`cost` decimal(9,2) NOT NULL default '0.00',
`sellmoney` decimal(9,2) NOT NULL default '0.00',
`ip` varchar(20) default NULL,
`buytime` datetime NOT NULL default '0000-00-00 00:00:00',
`selltime` datetime NOT NULL default '0000-00-00 00:00:00',
`other` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*
Table data for product.selllog
*/
INSERT INTO `selllog` VALUES
(2,'1',4,20,20.00,23.00,400.00,460.00,'127.0.0.1','2005-01-13 15:56:58','2005-01-13 17:51:31',''),
(3,'1',2,7,89.00,106.80,623.00,747.60,'127.0.0.1','2005-01-13 00:00:00','2005-01-13 17:53:20','');
/*
Table structure for stock
*/
drop table if exists `stock`;
CREATE TABLE `stock` (
`productid` int(6) NOT NULL default '0',
`amount` int(6) NOT NULL default '0',
`buyprice` decimal(9,2) NOT NULL default '0.00',
`sellprice` decimal(9,2) NOT NULL default '0.00',
`cost` decimal(9,2) NOT NULL default '0.00',
`introduction` text,
`buytime` datetime NOT NULL default '0000-00-00 00:00:00',
`other` text,
PRIMARY KEY (`productid`,`buyprice`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*
Table data for product.stock
*/
INSERT INTO `stock` VALUES
(2,20,89.00,106.80,1780.00,'','2005-01-13 15:56:46',''),
(3,33,50.00,61.00,1650.00,'','2005-01-13 15:24:16',''),
(4,30,20.00,23.00,600.00,'','2005-01-13 15:56:58','');
/*
Table structure for user
*/
drop table i