Setting up the database

We need to create a table in our Joomla! database to store the data for this component. Your local development environment should include phpMyAdmin which allows you to access the database directly. If you are using XAMPP, the URL will be http://localhost/phpmyadmin.

  1. Select your database.
  2. On the SQL tab, paste in the following, making sure that you change the jos_ prefix to suit your database:
    CREATE TABLE IF NOT EXISTS `jos_folio` (
      `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `title` varchar(250) NOT NULL DEFAULT '',
      `alias` varchar(255) NOT NULL DEFAULT '',  
      PRIMARY KEY (`id`)
  3. Press the GO button.

For now we are just creating three fields, an id field that contains ...

Get Learning Joomla! 3 Extension Development - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.