October 2009
Beginner
408 pages
7h 27m
English
Before you can begin working with comments, you need to have a place to store them. Create a table called comments in the simple_blog database; you'll use this to store all of your comment information.
You need to store several different kinds of information in this table:
Id: A unique identifier for the comment. This is the table's primary key. You can use the AUTO_INCREMENT property to simplify adding new comments.
blog_id: The identifier of the blog entry to which the comment corresponds. This column is an INT value. To speed up your queries, you can also create an index on this column.
name: The name of the commenter. This column accepts a maximum of 75 characters and is of the VARCHAR type. ...
Read now
Unlock full access