Purpose
For any database driven PHP application, it is necessary for the installer to create the tables (and possibly insert rows into these tables) by importing SQL. This step executes a file of SQL commands. It also has the potential to use user-entered data from the Configuration File Generator step in these SQL commands using tags.
Field Breakdown
Step Name - This title will be displayed at the top of this screen during the installation process.
Description - In the content area of the installation screen, this text will be displayed. The results of the SQL import will follow this description. You must format using HTML. For newlines, you should use '<br />' for HTML breaks.
SQL Import File - Select the file containing your SQL data from your hard drive. Just as tags were used in the Configuration File Generator, tags can be used in this file as well. All fields from the Configuration File Generator step are accessible here through tags like {tempconfig_[FIELDNAME]}. For example, if you have a field called 'Username' and want to insert the username in your database, you would use the tag '{tempconfig_Username}. An example of an SQL data file is below.
# We are only going to use on Field from the Configuration File Generator step.
# This field is 'Table Prefix' and will be part of the name of the table we create.
CREATE TABLE `{tempconfig_Table Prefix}content` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(50) NOT NULL default '',
`body` TEXT,
PRIMARY KEY (`id`)
) TYPE=MyISAM;
# If the user entered 'mydb_' as the Table Prefix, the table we just created would
# be called 'mydb_content'.
Database Host Configuration Name - This is the name of the Field which the user entered their Database Hostname.
Database Name Configuration Name - This is the name of the Field which the user entered their Database Name.
Database User Configuration Name - This is the name of the Field which the user entered their Database Username.
Database Password Configuration Name - This is the name of the Field which the user entered their Database Password.
Frequently Asked Questions
Which database software is this compatible with?
Currently, this step is only compatible with the free MySQL database software.
Why does this step have to be after the Configuration File Generator step?
This steps uses data such as the database connectivity information (and other information, if you wish) to execute the SQL commands so it is necessary for that step to occur before this one.