Book Image

Learning Joomla! 1.5 Extension Development

Book Image

Learning Joomla! 1.5 Extension Development

Overview of this book

Table of Contents (17 chapters)
Learning Joomla! 1.5 Extension Development
Credits
About the Author
About the Reviewer
Preface

Creating the database table


Before we set up an interface for entering reviews, we need to create a place in the database where they will go. We will start with a table where one row will represent one review. Assuming that your database prefix is jos_ (check Site | Global Configuration | Server if you are unsure), enter the following query into your SQL console:

CREATE TABLE `jos_reviews`
(
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL,
`address` varchar(255) NOT NULL,
`reservations` varchar(31) NOT NULL,
`quicktake` text NOT NULL,
`review` text NOT NULL,
`notes` text NOT NULL,
`smoking` tinyint(1) unsigned NOT NULL default `0`,
`credit_cards` varchar(255) NOT NULL,
`cuisine` varchar(31) NOT NULL,
`avg_dinner_price` tinyint(3) unsigned NOT NULL default `0`,
`review_date` datetime NOT NULL,
`published` tinyint(1) unsigned NOT NULL default `0`,
PRIMARY KEY (`id`)
);

If you're using phpMyAdmin, pull up the following screen and enter jos_reviews as the table name and specify...