Learning PHP and MySQL

Example 07-01 Creating the books and authors tables

CREATE TABLE books title_id INT NOT NULL AUTO_INCREMENT
                     
title VARCHAR (150),
                     
pages INT,
                     
PRIMARY KEY (title_id)); 
CREATE TABLE authors author_id INT NOT NULL AUTO_INCREMENT
                       
title_id INT NOT NULL,
                       
author VARCHAR (125), 
                       
PRIMARY KEY (author_id));

Posted by on 08/18 at 10:40 AM

Next entry: Example 07-02 The SQL to create and populate a purchases table that links user_ids and title_ids

Previous entry: Example 05-09 Using include_once to include a file

<< Back to main