<slide title="DB-driven Guestbook">

<php><![CDATA[<?
  // Clean out the table to we don't have old crap for this slide
  @mysql_connect("localhost");
  @mysql_db_query("mydb","delete from comments");
?>]]></php>

<blurb title="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.</blurb>

<example title="Create a database"><![CDATA[mysqladmin create mydb]]></example>
<example title="Create a Schema"><![CDATA[CREATE TABLE comments (
  id int(8) DEFAULT '0' NOT NULL auto_increment,
  comment text,
  ts datetime,
  PRIMARY KEY (id)
);]]></example>
</slide>
