-- phpMyAdmin SQL Dump
-- version 3.5.8.1
-- http://www.phpmyadmin.net
--
-- 主機: localhost
-- 產生日期: 2015 年 06 月 11 日 16:57
-- 伺服器版本: 5.1.72-community
-- PHP 版本: 5.4.24

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;USE `orderdrink`;

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

--
-- 表的結構 `orders`
--

CREATE TABLE IF NOT EXISTS `orders` (
  `orderid` int(6) unsigned zerofill NOT NULL AUTO_INCREMENT,
  `totalmoney` int(10) unsigned DEFAULT NULL,
  `name` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
  `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `address` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `ordertime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `finish` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`orderid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=20 ;

--
-- 轉存資料表中的資料 `orders`
--

INSERT INTO `orders` (`orderid`, `totalmoney`, `name`, `phone`, `address`, `ordertime`, `finish`) VALUES
(000001, 25, '黃小溢', '0955648889', '', '2015-05-18 06:14:44', 1),
(000002, 25, '黃小溢', '0955648889', '', '2015-05-18 06:18:43', 1),
(000003, 25, '黃小溢', '0955648889', '', '2015-05-18 06:23:22', 1),
(000004, 25, '黃小溢', '0955648889', '', '2015-05-18 06:23:43', 0),
(000005, 25, '黃小溢', '0955648889', '', '2015-05-18 06:25:12', 1),
(000006, 25, '黃小溢', '0955648889', '', '2015-05-18 06:26:00', 0),
(000007, 30, '黃小溢', '0955648889', '', '2015-05-18 06:31:55', 1),
(000008, 30, '黃小溢', '0955648889', '', '2015-05-18 06:36:31', 1),
(000009, 30, '黃小溢', '0933000000', '', '2015-05-18 09:10:03', 1),
(000010, 40, '黃小溢', '0955648889', '明德路20號', '2015-05-18 09:43:08', 0),
(000011, 140, '黃小溢', '0955648889', '明德路20號', '2015-05-19 00:52:44', 0),
(000012, 170, '林子炎', '0987654321', '', '2015-05-19 02:29:44', 0),
(000013, 160, '林子炎', '0912345678', '', '2015-05-19 06:44:35', 0),
(000014, 100, '黃小溢', '0955648889', '明德路20號', '2015-05-22 03:35:43', 0),
(000015, 155, 'david', '0921574694', '', '2015-05-29 03:03:33', 0),
(000016, 130, 'David', '0955648889', '', '2015-05-29 07:52:52', 0),
(000017, 90, '黃信溢', '0955648889', '', '2015-06-06 07:43:12', 1),
(000018, 50, '林子炎', '0912345678', '', '2015-06-11 03:26:30', 0),
(000019, 90, '林子炎', '0912345678', '', '2015-06-11 03:54:36', 0);

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

--
-- 表的結構 `product`
--

CREATE TABLE IF NOT EXISTS `product` (
  `productid` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `productnumber` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `productname` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `productprice` int(10) unsigned NOT NULL,
  `totalquantity` int(11) unsigned DEFAULT NULL,
  PRIMARY KEY (`productid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=13 ;

--
-- 轉存資料表中的資料 `product`
--

INSERT INTO `product` (`productid`, `productnumber`, `productname`, `productprice`, `totalquantity`) VALUES
(1, 'A01', '茉香紅茶', 20, 5),
(2, 'A02', '檸檬紅茶', 25, 2),
(3, 'A03', '百香果紅茶', 25, 7),
(4, 'A04', '仙草紅茶', 25, 5),
(5, 'B01', '茉香綠茶', 20, 4),
(6, 'B02', '檸檬綠茶', 25, 2),
(7, 'B03', '百香果綠茶', 25, 3),
(8, 'B04', '仙草綠茶', 25, 0),
(9, 'C01', '珍珠奶茶', 30, 6),
(10, 'C02', '胚芽奶茶', 30, 7),
(11, 'C03', '新鮮柳橙汁', 40, 7),
(12, 'C04', '仙草凍', 40, 1);

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

--
-- 表的結構 `productdetail`
--

CREATE TABLE IF NOT EXISTS `productdetail` (
  `productdetailid` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `orderid` int(6) unsigned zerofill DEFAULT NULL,
  `productnumber` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL,
  `productname` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
  `productprice` int(10) unsigned DEFAULT NULL,
  `productquantity` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`productdetailid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=29 ;

--
-- 轉存資料表中的資料 `productdetail`
--

INSERT INTO `productdetail` (`productdetailid`, `orderid`, `productnumber`, `productname`, `productprice`, `productquantity`) VALUES
(1, 000001, 'A03', '百香果紅茶', 25, 1),
(2, 000002, 'A03', '百香果紅茶', 25, 1),
(3, 000003, 'A03', '百香果紅茶', 25, 1),
(4, 000004, 'A03', '百香果紅茶', 25, 1),
(5, 000005, 'A03', '百香果紅茶', 25, 1),
(6, 000006, 'A03', '百香果紅茶', 25, 1),
(7, 000007, 'C02', '胚芽奶茶', 30, 1),
(8, 000008, 'C02', '胚芽奶茶', 30, 1),
(9, 000009, 'C02', '胚芽奶茶', 30, 1),
(10, 000010, 'A01', '茉香紅茶', 20, 2),
(11, 000011, 'A01', '茉香紅茶', 20, 3),
(12, 000011, 'A03', '百香果紅茶', 25, 1),
(13, 000011, 'B03', '百香果綠茶', 25, 1),
(14, 000011, 'C02', '胚芽奶茶', 30, 1),
(15, 000012, 'C01', '珍珠奶茶', 30, 4),
(16, 000012, 'B03', '百香果綠茶', 25, 2),
(17, 000013, 'C03', '新鮮柳橙汁', 40, 3),
(18, 000013, 'B01', '茉香綠茶', 20, 2),
(19, 000014, 'B01', '茉香綠茶', 20, 2),
(20, 000014, 'C01', '珍珠奶茶', 30, 2),
(21, 000015, 'A04', '仙草紅茶', 25, 3),
(22, 000015, 'C03', '新鮮柳橙汁', 40, 2),
(23, 000016, 'B02', '檸檬綠茶', 25, 2),
(24, 000016, 'C03', '新鮮柳橙汁', 40, 2),
(25, 000017, 'A02', '檸檬紅茶', 25, 2),
(26, 000017, 'C04', '仙草凍', 40, 1),
(27, 000018, 'A04', '仙草紅茶', 25, 2),
(28, 000019, 'C02', '胚芽奶茶', 30, 3);

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
