SQL'izing the Guestbook Example
We are going to convert this into an SQL-driven guestbook by first creating a database, then a schema for the table where we will store the data and then we will modify the code.

Create a database
mysqladmin create mydb
Create a Schema
CREATE TABLE comments (
  id int(8) DEFAULT '0' NOT NULL auto_increment,
  comment text,
  ts datetime,
  PRIMARY KEY (id)
);