-- phpMyAdmin SQL Dump
-- version 2.11.6
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 03, 2008 at 06:06 PM
-- Server version: 4.1.22
-- PHP Version: 5.2.6

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

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

--
-- Table structure for table `category`
--

CREATE TABLE IF NOT EXISTS `category` (
  `id` int(10) NOT NULL auto_increment,
  `name` varchar(50) collate latin1_general_ci NOT NULL default '',
  `piccount` int(10) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci COMMENT='Table for storing category' AUTO_INCREMENT=5 ;

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

--
-- Table structure for table `image`
--

CREATE TABLE IF NOT EXISTS `image` (
  `id` int(10) NOT NULL auto_increment,
  `filename` varchar(50) collate latin1_general_ci NOT NULL default '',
  `url` varchar(100) collate latin1_general_ci NOT NULL default '',
  `thumbnail` varchar(100) collate latin1_general_ci default NULL,
  `createddate` datetime NOT NULL default '0000-00-00 00:00:00',
  `deleted` tinyint(1) NOT NULL default '0',
  `width` int(10) NOT NULL default '0',
  `height` int(10) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci COMMENT='Table for storing user upload data' AUTO_INCREMENT=5 ;

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

--
-- Table structure for table `image_category`
--

CREATE TABLE IF NOT EXISTS `image_category` (
  `imageid` int(10) NOT NULL default '0',
  `categoryid` int(10) NOT NULL default '0',
  PRIMARY KEY  (`imageid`,`categoryid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci COMMENT='relationship between image and category';
