Learning PHP and MySQL

Example 16-5 SQL to create the posts table

CREATE  TABLE  `posts`  (
   `
post_id`  int(11)  NOT  NULL  auto_increment,
   `
category_id`  int(11)  NOT  NULL,
   `
user_id`  int(11)  NOT  NULL,
   `
title`  varchar(150)  NOT  NULL,
   `
body`  text  NOT  NULL,
   `
posted`  timestampPRIMARY  KEY    (`post_id`)
);

Posted by on 09/27 at 11:35 AM

Next entry: Example 16-6 SQL to create the categories table

Previous entry: Example 16-4 The login script, called login.php

<< Back to main