Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
- --
- -- Database: `blogdb`
- --
- -- Please see this tutorial:
- -- net.tutsplus.com/tutorials/php/how-to-create-an-object-oriented-blog-using-php/
- -- --------------------------------------------------------
- --
- -- Table structure for table `blog_posts`
- --
- CREATE TABLE `blog_posts` (
- `id` INT(11) NOT NULL AUTO_INCREMENT,
- `title` VARCHAR(255) NOT NULL DEFAULT '',
- `post` text NOT NULL,
- `author_id` INT(11) NOT NULL DEFAULT '0',
- `date_posted` DATE NOT NULL DEFAULT '0000-00-00',
- PRIMARY KEY (`id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
- --
- -- Data for table `blog_posts`
- -- Dates work on YYYY-MM-DD
- --
- INSERT INTO `blog_posts` (`id`, `title`, `post`, `author_id`, `date_posted`) VALUES
- (1, 'This is my first post', 'Hello, and welcome to the world of PHP', 1, '2012-05-17'),
- (2, 'Web designer', 'The World Wide Web was first though up by computer scientist Sir Tim Berners-Lee, who proposed a system of hypertext systems to work on the Internet in the late 1980s.', 1, '2012-05-17'),
- (3, 'The importance good design', 'Good, appealing web design works for the masses, and not the classes.', 1, '2012-05-17');
- -- --------------------------------------------------------
- --
- -- Table structure for table `blog_post_tags`
- --
- CREATE TABLE `blog_post_tags` (
- `blog_post_id` INT(11) NOT NULL DEFAULT '0',
- `tag_id` INT(11) NOT NULL DEFAULT '0'
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
- --
- -- Data for table `blog_post_tags`
- --
- INSERT INTO `blog_post_tags` (`blog_post_id`, `tag_id`) VALUES
- (2, 1),
- (3, 2);
- -- --------------------------------------------------------
- --
- -- Table structure for table `people`
- --
- CREATE TABLE `people` (
- `id` INT(11) NOT NULL AUTO_INCREMENT,
- `first_name` VARCHAR(255) NOT NULL DEFAULT '',
- `last_name` VARCHAR(255) NOT NULL DEFAULT '',
- `url` VARCHAR(255) NOT NULL DEFAULT '',
- `email` VARCHAR(255) NOT NULL DEFAULT '',
- PRIMARY KEY (`id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
- --
- -- Data for table `people`
- --
- INSERT INTO `people` (`id`, `first_name`, `last_name`, `url`, `email`) VALUES
- (1, 'Shaun', 'Bebbington', 'http://www.metapps.co.uk/', 'shaun.bebbington@metap.com');
- -- --------------------------------------------------------
- --
- -- Table structure for table `tags`
- --
- CREATE TABLE `tags` (
- `id` INT(11) NOT NULL AUTO_INCREMENT,
- `name` VARCHAR(255) NOT NULL DEFAULT '',
- PRIMARY KEY (`id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
- --
- -- Data for table `tags`
- --
- INSERT INTO `tags` (`id`, `name`) VALUES
- (1, 'Web Design'),
- (2, 'PHP'),
- (3, 'World Wide Web');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement