-- http://www.phpmyadmin.net
-- 
-- 
-- Database: `samples`
-- 
CREATE DATABASE `samples`;
USE samples;

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

-- 
-- Table structure for table `categories`
-- 

CREATE TABLE `categories` (
  `category_id` int(10) unsigned NOT NULL auto_increment,
  `category_name` varchar(30) NOT NULL default '',
  `description` varchar(255) default NULL,
  `image_name` varchar(150) default NULL,
  PRIMARY KEY  (`category_id`)
) TYPE=MyISAM;

-- 
-- Dumping data for table `categories`
-- 


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

-- 
-- Table structure for table `customers`
-- 

CREATE TABLE `customers` (
  `customer_id` int(10) unsigned NOT NULL auto_increment,
  `fname` varchar(35) NOT NULL default '',
  `mname` varchar(35) default NULL,
  `lname` varchar(35) default NULL,
  `company` varchar(40) default NULL,
  `title` varchar(30) default NULL,
  `address1` varchar(60) NOT NULL default '',
  `address2` varchar(60) default NULL,
  `address3` varchar(60) default NULL,
  `city` varchar(50) NOT NULL default '',
  `state_province` varchar(50) default NULL,
  `country` varchar(50) NOT NULL default '',
  `postal_code` varchar(30) NOT NULL default '',
  `phone` varchar(25) default NULL,
  `fax` varchar(25) default NULL,
  PRIMARY KEY  (`customer_id`)
) TYPE=MyISAM;

-- 
-- Dumping data for table `customers`
-- 

INSERT INTO `customers` (`customer_id`, `fname`, `mname`, `lname`, `company`, `title`, `address1`, `address2`, `address3`, `city`, `state_province`, `country`, `postal_code`, `phone`, `fax`) VALUES (1, 'George', '', 'Clington', 'Nowhere Inc.', 'President', '101 New York Ave.', '', '', 'New York', 'New York', 'USA', '10101', '212-555-1212', '');
INSERT INTO `customers` (`customer_id`, `fname`, `mname`, `lname`, `company`, `title`, `address1`, `address2`, `address3`, `city`, `state_province`, `country`, `postal_code`, `phone`, `fax`) VALUES (5, '', '', '', '', '', '', '', '', '', '', '', '', '', '');
INSERT INTO `customers` (`customer_id`, `fname`, `mname`, `lname`, `company`, `title`, `address1`, `address2`, `address3`, `city`, `state_province`, `country`, `postal_code`, `phone`, `fax`) VALUES (6, 'Fname', 'Mname', 'Lname', 'Company', 'Title', 'Address1', 'Address2', 'Address3', 'City', 'State_province', 'Country', 'Postal_code', 'Phone', 'Fax');
INSERT INTO `customers` (`customer_id`, `fname`, `mname`, `lname`, `company`, `title`, `address1`, `address2`, `address3`, `city`, `state_province`, `country`, `postal_code`, `phone`, `fax`) VALUES (7, '', '', '', '', '', 'George St.', '', '', '', '', '', '', '', '');

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

-- 
-- Table structure for table `order_details`
-- 

CREATE TABLE `order_details` (
  `order_id` int(10) unsigned NOT NULL default '0',
  `product_id` varchar(35) NOT NULL default '',
  `unit_price` float unsigned default NULL,
  `quantity` float unsigned default NULL,
  `discount` float unsigned NOT NULL default '0',
  PRIMARY KEY  (`order_id`,`product_id`)
) TYPE=MyISAM;

-- 
-- Dumping data for table `order_details`
-- 


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

-- 
-- Table structure for table `orders`
-- 

CREATE TABLE `orders` (
  `order_id` int(10) unsigned NOT NULL auto_increment,
  `customer_id` int(10) unsigned NOT NULL default '0',
  `order_date` datetime NOT NULL default '0000-00-00 00:00:00',
  `shipped_date` datetime NOT NULL default '0000-00-00 00:00:00',
  `shipper` varchar(40) NOT NULL default '',
  `total_order` float NOT NULL default '0',
  `ship_cost` float NOT NULL default '0',
  `ship_address1` varchar(60) NOT NULL default '',
  `ship_address2` varchar(60) default NULL,
  `ship_address3` varchar(60) default NULL,
  `ship_city` varchar(40) NOT NULL default '',
  `ship_state_province` varchar(40) default NULL,
  `ship_country` varchar(50) NOT NULL default '',
  `ship_postal_code` varchar(30) NOT NULL default '',
  PRIMARY KEY  (`order_id`),
  UNIQUE KEY `invoice_id` (`order_id`)
) TYPE=MyISAM;

-- 
-- Dumping data for table `orders`
-- 


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

-- 
-- Table structure for table `posts`
-- 

CREATE TABLE `posts` (
  `id` mediumint(9) NOT NULL auto_increment,
  `authorname` varchar(60) default NULL,
  `authoremail` varchar(60) default NULL,
  `messagebody` blob,
  KEY `id` (`id`)
) TYPE=MyISAM;

-- 
-- Dumping data for table `posts`
-- 

INSERT INTO `posts` (`id`, `authorname`, `authoremail`, `messagebody`) VALUES (12, 'Joe Knoll', 'jknoll@test.com', 0x54686973206973206d7920706f7374);

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

-- 
-- Table structure for table `products`
-- 

CREATE TABLE `products` (
  `product_id` varchar(35) NOT NULL default '',
  `product_name` varchar(100) NOT NULL default '',
  `category_id` int(11) NOT NULL default '0',
  `unit_price` int(11) NOT NULL default '0',
  `in_stock` int(11) NOT NULL default '0',
  `description` varchar(255) default NULL,
  `is_active` tinyint(4) NOT NULL default '0'
) TYPE=MyISAM;

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

-- 
-- Table structure for table `topics`
-- 

CREATE TABLE `topics` (
  `id` mediumint(9) NOT NULL auto_increment,
  `subject` varchar(60) NOT NULL default '',
  KEY `id` (`id`)
) TYPE=MyISAM;

-- 
-- Dumping data for table `topics`
-- 

INSERT INTO `topics` (`id`, `subject`) VALUES (1, 'Subject');
INSERT INTO `topics` (`id`, `subject`) VALUES (2, 'Subject');
INSERT INTO `topics` (`id`, `subject`) VALUES (3, '1');
INSERT INTO `topics` (`id`, `subject`) VALUES (4, '1222');
