-- phpMyAdmin SQL Dump
-- version 3.5.8.1
-- http://www.phpmyadmin.net
--
-- 主機: localhost
-- 產生日期: 2015 年 06 月 11 日 17:00
-- 伺服器版本: 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 */;

--
-- 資料庫: `orderdrink`
--
CREATE DATABASE `orderdrink` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
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 ;

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

--
-- 表的結構 `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 ;

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

--
-- 表的結構 `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 ;

/*!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 */;
