-- phpMyAdmin SQL Dump
-- version 3.2.5
--
-- Host: localhost
-- Generation Time: Oct 05, 2010 at 12:24 AM
-- Server version: 5.1.44
-- PHP Version: 5.2.13
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `blogDB`
--
-- --------------------------------------------------------
--
-- Table structure for table `comments`
--
CREATE TABLE `comments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(300) DEFAULT NULL,
`email` varchar(70) NOT NULL,
`body` text NOT NULL,
`post_id` int(11) NOT NULL,
`published` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `post_id` (`post_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
--
-- Dumping data for table `comments`
--
INSERT INTO `comments` VALUES(1, 'asdasdasd', '
em...@mail.com', 'asdsadsad', 2, '2010-10-05 00:00:00');
INSERT INTO `comments` VALUES(2, 'asdasdasd', '
em...@mail.com', 'asdsadsad', 2, '2010-10-04 00:00:00');
INSERT INTO `comments` VALUES(3, 'Comment ', '
com...@mail.com', 'comment ', 3, '2010-10-04 16:44:41');
INSERT INTO `comments` VALUES(4, 'dasdasdsd', '
em...@mail.com', 'sdasasd', 3, '2010-10-04 16:46:22');
INSERT INTO `comments` VALUES(5, 'ffsdfs', '
sdf...@fsdfsd.com', 'sdfsdfdsfsdf', 4, '2010-10-04 17:10:29');
INSERT INTO `comments` VALUES(6, 'test', '
te...@test.com', 'test test ', 2, '2010-10-04 17:43:29');
-- --------------------------------------------------------
--
-- Table structure for table `posts`
--
CREATE TABLE `posts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(300) NOT NULL,
`body` text NOT NULL,
`published` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`user_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
--
-- Dumping data for table `posts`
--
INSERT INTO `posts` VALUES(2, 'This is my first blog post', 'lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text ', '2010-10-03 17:10:23', 2);
INSERT INTO `posts` VALUES(3, 'This is my fsecond blog post', 'lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text ', '2010-10-03 17:10:48', 2);
INSERT INTO `posts` VALUES(4, 'This is my third blog post', 'lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text ', '2010-10-03 17:11:00', 2);
INSERT INTO `posts` VALUES(5, 'This is my fourth blog post', 'lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text ', '2010-10-03 17:11:12', 2);
INSERT INTO `posts` VALUES(6, 'This is my fifth blog post', 'lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text lorem text is slandered dummy text ', '2010-10-03 17:11:17', 2);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(100) NOT NULL,
`password` varchar(32) NOT NULL,
`email` varchar(70) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`,`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ;
--
-- Dumping data for table `users`
--
INSERT INTO `users` VALUES(3, 'YourName', 'password', '
ma...@mail.com');
INSERT INTO `users` VALUES(5, 'Mohammed', 'newPassword', '
us...@mail.com');
INSERT INTO `users` VALUES(9, 'sfsdfsdf', 'password', 'sdfsdfds');
--
-- Constraints for dumped tables
--
--
-- Constraints for table `comments`
--
ALTER TABLE `comments`
ADD CONSTRAINT `comments_ibfk_1` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`);
--
-- Constraints for table `posts`
--
ALTER TABLE `posts`
ADD CONSTRAINT `posts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);