-- phpMyAdmin SQL Dump
-- version 2.10.3
-- http://www.phpmyadmin.net
-- 
-- Host: localhost
-- Generation Time: Aug 07, 2021 at 11:54 PM
-- Server version: 5.0.51
-- PHP Version: 5.2.6

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

-- 
-- Database: `myposdb`
-- 

-- --------------------------------------------------------

-- 
-- Table structure for table `prod_bak`
-- 

CREATE TABLE `prod_bak` (
  `id` int(5) NOT NULL auto_increment,
  `name` varchar(20) NOT NULL,
  `ename` varchar(20) NOT NULL,
  `photo` varchar(50) NOT NULL,
  `price` float NOT NULL,
  `stock` int(5) NOT NULL,
  `pstatus` int(1) NOT NULL,
  `tb_order` int(5) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;

-- 
-- Dumping data for table `prod_bak`
-- 

INSERT INTO `prod_bak` VALUES (1, 'çƒ§åŒ…ï¼ˆçŒªï¼‰', 'SiewBaoPork', 'pic_shaobao.jpg', 2, 100, 1, 1);
INSERT INTO `prod_bak` VALUES (2, 'è›‹æŒž', 'EggTartSkin', 'pic_danta.jpg', 2.1, 100, 1, 4);
INSERT INTO `prod_bak` VALUES (3, 'åŠ å¤®è§’', 'KayaPuff', 'pic_kaya.jpg', 1.9, 100, 1, 3);
INSERT INTO `prod_bak` VALUES (4, 'çƒ§åŒ…ï¼ˆé¸¡ï¼‰', 'SiewBaoChic', 'pic_shaobao.jpg', 2, 100, 1, 2);
INSERT INTO `prod_bak` VALUES (5, 'å’¸è›‹é…¥', 'SaltedEggPastry', 'pic_xiandansu.jpg', 2, 100, 1, 5);

-- --------------------------------------------------------

-- 
-- Table structure for table `tb_admin`
-- 

CREATE TABLE `tb_admin` (
  `id` int(5) NOT NULL auto_increment,
  `name` varchar(30) NOT NULL,
  `pass` varchar(15) NOT NULL,
  `level` int(1) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

-- 
-- Dumping data for table `tb_admin`
-- 

INSERT INTO `tb_admin` VALUES (1, 'admin', '1234', 9);
INSERT INTO `tb_admin` VALUES (2, 'sales', '1234', 0);

-- --------------------------------------------------------

-- 
-- Table structure for table `tb_cart`
-- 

CREATE TABLE `tb_cart` (
  `id` int(5) NOT NULL auto_increment,
  `ctimestamp` int(20) NOT NULL,
  `productid` int(5) NOT NULL,
  `qtty` int(3) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- 
-- Dumping data for table `tb_cart`
-- 


-- --------------------------------------------------------

-- 
-- Table structure for table `tb_order`
-- 

CREATE TABLE `tb_order` (
  `id` int(5) NOT NULL auto_increment,
  `otimestamp` int(20) NOT NULL,
  `odate` date NOT NULL,
  `billno` int(15) NOT NULL,
  `total` double NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=41 ;

-- 
-- Dumping data for table `tb_order`
-- 

INSERT INTO `tb_order` VALUES (1, 1611459074, '2021-01-01', 2021001, 0);
INSERT INTO `tb_order` VALUES (2, 1611528319, '2021-01-25', 2021002, 8.2);
INSERT INTO `tb_order` VALUES (3, 1611663141, '2021-01-26', 2021003, 10.2);
INSERT INTO `tb_order` VALUES (4, 1611663383, '2021-01-26', 2021004, 6);
INSERT INTO `tb_order` VALUES (5, 1611663956, '2021-01-26', 2021005, 9.8);
INSERT INTO `tb_order` VALUES (6, 1611664326, '2021-01-26', 2021006, 8.1);
INSERT INTO `tb_order` VALUES (7, 1611667135, '2021-01-26', 2021007, 24.1);
INSERT INTO `tb_order` VALUES (8, 1611668827, '2021-01-26', 2021008, 6);
INSERT INTO `tb_order` VALUES (9, 1611669016, '2021-01-26', 2021009, 9.7);
INSERT INTO `tb_order` VALUES (10, 1611669361, '2021-01-26', 2021010, 6.1);
INSERT INTO `tb_order` VALUES (11, 1615687826, '2021-03-14', 2021011, 4);
INSERT INTO `tb_order` VALUES (12, 1615687840, '2021-03-14', 2021012, 8);
INSERT INTO `tb_order` VALUES (13, 1615691500, '2021-03-14', 2021013, 2);
INSERT INTO `tb_order` VALUES (14, 1615692023, '2021-03-14', 2021014, 8);
INSERT INTO `tb_order` VALUES (15, 1615692079, '2021-03-14', 2021015, 10);
INSERT INTO `tb_order` VALUES (16, 1615692236, '2021-03-14', 2021016, 4);
INSERT INTO `tb_order` VALUES (17, 1624945463, '2021-06-29', 2021017, 6);
INSERT INTO `tb_order` VALUES (18, 1624953651, '2021-06-29', 2021018, 4);
INSERT INTO `tb_order` VALUES (19, 1624953699, '2021-06-29', 2021019, 4);
INSERT INTO `tb_order` VALUES (20, 1624953717, '2021-06-29', 2021020, 8);
INSERT INTO `tb_order` VALUES (21, 1624954035, '2021-06-29', 2021021, 4);
INSERT INTO `tb_order` VALUES (22, 0, '1970-01-01', 2021022, 0);
INSERT INTO `tb_order` VALUES (23, 0, '1970-01-01', 2021023, 0);
INSERT INTO `tb_order` VALUES (24, 1624954540, '2021-06-29', 2021024, 4);
INSERT INTO `tb_order` VALUES (25, 1624954540, '2021-06-29', 2021025, 4);
INSERT INTO `tb_order` VALUES (26, 1624954540, '2021-06-29', 2021026, 4);
INSERT INTO `tb_order` VALUES (27, 1624954540, '2021-06-29', 2021027, 4);
INSERT INTO `tb_order` VALUES (28, 1624954540, '2021-06-29', 2021028, 4);
INSERT INTO `tb_order` VALUES (29, 1624954540, '2021-06-29', 2021029, 4);
INSERT INTO `tb_order` VALUES (30, 1624955557, '2021-06-29', 2021030, 4);
INSERT INTO `tb_order` VALUES (31, 1624956138, '2021-06-29', 2021031, 8);
INSERT INTO `tb_order` VALUES (32, 1624956196, '2021-06-29', 2021032, 8);
INSERT INTO `tb_order` VALUES (33, 1624956338, '2021-06-29', 2021033, 4);
INSERT INTO `tb_order` VALUES (34, 1624956357, '2021-06-29', 2021034, 12);
INSERT INTO `tb_order` VALUES (35, 1625032927, '2021-06-30', 2021035, 4);
INSERT INTO `tb_order` VALUES (36, 1625032943, '2021-06-30', 2021036, 8.4);
INSERT INTO `tb_order` VALUES (37, 1625035153, '2021-06-30', 2021037, 10);
INSERT INTO `tb_order` VALUES (38, 1625035169, '2021-06-30', 2021038, 10);
INSERT INTO `tb_order` VALUES (39, 1625035556, '2021-06-30', 2021039, 24.8);
INSERT INTO `tb_order` VALUES (40, 1625131913, '2021-07-01', 2021040, 4);

-- --------------------------------------------------------

-- 
-- Table structure for table `tb_orderitem`
-- 

CREATE TABLE `tb_orderitem` (
  `id` int(10) NOT NULL auto_increment,
  `orderid` int(5) NOT NULL,
  `prodID` int(5) NOT NULL,
  `qtty` int(5) NOT NULL,
  `price` double NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=75 ;

-- 
-- Dumping data for table `tb_orderitem`
-- 

INSERT INTO `tb_orderitem` VALUES (1, 2021002, 4, 1, 2);
INSERT INTO `tb_orderitem` VALUES (2, 2021002, 2, 2, 2.1);
INSERT INTO `tb_orderitem` VALUES (3, 2021002, 5, 1, 2);
INSERT INTO `tb_orderitem` VALUES (4, 2021003, 5, 1, 2);
INSERT INTO `tb_orderitem` VALUES (5, 2021003, 4, 2, 2);
INSERT INTO `tb_orderitem` VALUES (6, 2021003, 2, 2, 2.1);
INSERT INTO `tb_orderitem` VALUES (7, 2021004, 5, 2, 2);
INSERT INTO `tb_orderitem` VALUES (8, 2021004, 1, 1, 2);
INSERT INTO `tb_orderitem` VALUES (9, 2021005, 5, 2, 2);
INSERT INTO `tb_orderitem` VALUES (10, 2021005, 1, 1, 2);
INSERT INTO `tb_orderitem` VALUES (11, 2021005, 3, 2, 1.9);
INSERT INTO `tb_orderitem` VALUES (12, 2021006, 5, 1, 2);
INSERT INTO `tb_orderitem` VALUES (13, 2021006, 1, 2, 2);
INSERT INTO `tb_orderitem` VALUES (14, 2021006, 2, 1, 2.1);
INSERT INTO `tb_orderitem` VALUES (15, 2021007, 4, 7, 2);
INSERT INTO `tb_orderitem` VALUES (16, 2021007, 3, 1, 1.9);
INSERT INTO `tb_orderitem` VALUES (17, 2021007, 2, 2, 2.1);
INSERT INTO `tb_orderitem` VALUES (18, 2021007, 5, 2, 2);
INSERT INTO `tb_orderitem` VALUES (19, 2021008, 4, 2, 2);
INSERT INTO `tb_orderitem` VALUES (20, 2021008, 5, 1, 2);
INSERT INTO `tb_orderitem` VALUES (21, 2021009, 1, 2, 2);
INSERT INTO `tb_orderitem` VALUES (22, 2021009, 3, 3, 1.9);
INSERT INTO `tb_orderitem` VALUES (23, 2021010, 2, 1, 2.1);
INSERT INTO `tb_orderitem` VALUES (24, 2021010, 5, 2, 2);
INSERT INTO `tb_orderitem` VALUES (25, 2021011, 4, 1, 2);
INSERT INTO `tb_orderitem` VALUES (26, 2021011, 4, 1, 2);
INSERT INTO `tb_orderitem` VALUES (27, 2021012, 4, 2, 2);
INSERT INTO `tb_orderitem` VALUES (28, 2021012, 2, 2, 2);
INSERT INTO `tb_orderitem` VALUES (29, 2021013, 4, 1, 2);
INSERT INTO `tb_orderitem` VALUES (30, 2021014, 4, 2, 2);
INSERT INTO `tb_orderitem` VALUES (31, 2021014, 3, 2, 2);
INSERT INTO `tb_orderitem` VALUES (32, 2021015, 4, 5, 2);
INSERT INTO `tb_orderitem` VALUES (33, 2021016, 4, 2, 2);
INSERT INTO `tb_orderitem` VALUES (34, 2021017, 1, 1, 2);
INSERT INTO `tb_orderitem` VALUES (35, 2021017, 4, 2, 2);
INSERT INTO `tb_orderitem` VALUES (36, 2021018, 1, 1, 2);
INSERT INTO `tb_orderitem` VALUES (37, 2021018, 4, 1, 2);
INSERT INTO `tb_orderitem` VALUES (38, 2021019, 1, 1, 2);
INSERT INTO `tb_orderitem` VALUES (39, 2021019, 4, 1, 2);
INSERT INTO `tb_orderitem` VALUES (40, 2021020, 1, 2, 2);
INSERT INTO `tb_orderitem` VALUES (41, 2021020, 4, 2, 2);
INSERT INTO `tb_orderitem` VALUES (42, 2021021, 1, 1, 2);
INSERT INTO `tb_orderitem` VALUES (43, 2021021, 4, 1, 2);
INSERT INTO `tb_orderitem` VALUES (44, 2021024, 1, 1, 2);
INSERT INTO `tb_orderitem` VALUES (45, 2021024, 4, 1, 2);
INSERT INTO `tb_orderitem` VALUES (46, 2021025, 1, 1, 2);
INSERT INTO `tb_orderitem` VALUES (47, 2021025, 4, 1, 2);
INSERT INTO `tb_orderitem` VALUES (48, 2021026, 1, 1, 2);
INSERT INTO `tb_orderitem` VALUES (49, 2021026, 4, 1, 2);
INSERT INTO `tb_orderitem` VALUES (50, 2021027, 1, 1, 2);
INSERT INTO `tb_orderitem` VALUES (51, 2021027, 4, 1, 2);
INSERT INTO `tb_orderitem` VALUES (52, 2021028, 1, 1, 2);
INSERT INTO `tb_orderitem` VALUES (53, 2021028, 4, 1, 2);
INSERT INTO `tb_orderitem` VALUES (54, 2021029, 1, 1, 2);
INSERT INTO `tb_orderitem` VALUES (55, 2021029, 4, 1, 2);
INSERT INTO `tb_orderitem` VALUES (56, 2021030, 1, 1, 2);
INSERT INTO `tb_orderitem` VALUES (57, 2021030, 4, 1, 2);
INSERT INTO `tb_orderitem` VALUES (58, 2021031, 1, 2, 2);
INSERT INTO `tb_orderitem` VALUES (59, 2021031, 4, 2, 2);
INSERT INTO `tb_orderitem` VALUES (60, 2021032, 1, 2, 2);
INSERT INTO `tb_orderitem` VALUES (61, 2021032, 4, 2, 2);
INSERT INTO `tb_orderitem` VALUES (62, 2021033, 1, 1, 2);
INSERT INTO `tb_orderitem` VALUES (63, 2021033, 4, 1, 2);
INSERT INTO `tb_orderitem` VALUES (64, 2021034, 1, 3, 2);
INSERT INTO `tb_orderitem` VALUES (65, 2021034, 4, 3, 2);
INSERT INTO `tb_orderitem` VALUES (66, 2021035, 1, 2, 2);
INSERT INTO `tb_orderitem` VALUES (67, 2021036, 2, 2, 2);
INSERT INTO `tb_orderitem` VALUES (68, 2021036, 9, 2, 2.2);
INSERT INTO `tb_orderitem` VALUES (69, 2021037, 3, 5, 2);
INSERT INTO `tb_orderitem` VALUES (70, 2021038, 2, 5, 2);
INSERT INTO `tb_orderitem` VALUES (71, 2021039, 5, 4, 2);
INSERT INTO `tb_orderitem` VALUES (72, 2021039, 3, 4, 2);
INSERT INTO `tb_orderitem` VALUES (73, 2021039, 8, 4, 2.2);
INSERT INTO `tb_orderitem` VALUES (74, 2021040, 3, 2, 2);

-- --------------------------------------------------------

-- 
-- Table structure for table `tb_product`
-- 

CREATE TABLE `tb_product` (
  `id` int(5) NOT NULL auto_increment,
  `name` varchar(20) NOT NULL,
  `ename` varchar(20) NOT NULL,
  `photo` varchar(50) NOT NULL,
  `price` float NOT NULL,
  `stock` int(5) NOT NULL,
  `pstatus` int(1) NOT NULL,
  `tb_order` int(5) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=16 ;

-- 
-- Dumping data for table `tb_product`
-- 

INSERT INTO `tb_product` VALUES (1, 'çƒ§åŒ…ï¼ˆçŒªï¼‰', 'ShaoBaoPork', '1625035110.jpg', 2, 91, 1, 2);
INSERT INTO `tb_product` VALUES (2, 'è›‹æŒž', 'EggTart', '1625033724.jpg', 2, 93, 1, 3);
INSERT INTO `tb_product` VALUES (3, 'åŠ å¤®è§’', 'KayaPuff', '1625034408.jpg', 2, 89, 1, 6);
INSERT INTO `tb_product` VALUES (4, 'çƒ§åŒ…ï¼ˆé¸¡ï¼‰', 'ShaoBaoChic', '1625035126.jpg', 2, 91, 1, 1);
INSERT INTO `tb_product` VALUES (5, 'å’¸è›‹é…¥', 'SaltedEggPastry', '1625034348.jpg', 2, 96, 0, 10);
INSERT INTO `tb_product` VALUES (6, 'è±†æ²™é¥¼', 'GreenBeanBis', '1625033451.jpg', 1, 100, 0, 9);
INSERT INTO `tb_product` VALUES (7, 'è‚‰å¹²é…¥', 'DriMeatPas', '1625033461.jpg', 2.2, 100, 1, 7);
INSERT INTO `tb_product` VALUES (8, 'å’–å–±é…¥', 'KariPas', '1615687788.jpg', 2.2, 96, 0, 11);
INSERT INTO `tb_product` VALUES (9, 'æ¤°æŒž', 'CoconutTart', '1615687709.jpg', 2.2, 98, 1, 4);
INSERT INTO `tb_product` VALUES (10, 'è‘¡æŒž', 'Portug.Tart', '1625033962.jpg', 2.5, 100, 1, 5);

-- --------------------------------------------------------

-- 
-- Table structure for table `test`
-- 

CREATE TABLE `test` (
  `id` int(2) NOT NULL,
  `name` varchar(10) NOT NULL,
  `qtty` int(3) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table `test`
-- 

INSERT INTO `test` VALUES (1, 'test1', 190);
INSERT INTO `test` VALUES (2, 'test2', 290);
INSERT INTO `test` VALUES (3, 't3', 3);
INSERT INTO `test` VALUES (4, 't4', 7);
INSERT INTO `test` VALUES (5, 'test5', 590);
