Creating an SQL Development Environment
To start this tutorial based on SQL examples, a working environment should be defined.
Using XAMPP or equivalent local server software (see programming tools), the important things are already done:
- The Apache server
is installed locally.
- MySQL is installed on your computer.
- PHPMyAdmin is ready to run if necessary.
- PHP is configured to include the mysql extension with which we shall work.
The scripts that
we will use have to be stored in a subdirectory of the www directory of the
To start a script, we need to open the drop-down menu of the software in the taskbar and click on localhost, then click on the project directory name.
The examples we provide are designed to operate on a server. You need to verify that the configuration of your host is ready to run such scripts.
For that upload a small script under the name infos.php (verifying that no files already has that name):
<?php phpinfo(); ?>
Then launch this program:
If the program does not work, either PHP or phpinfo are not supported. Consult the documentation for the host or change the host.
Otherwise check that
the version of PHP is at least PHP 4 and that the mysql extension is included.
Each extension has
a own descriptive table with the name of the extension above.
Erase infos.php then.
If the mysql extension is included we could run the examples online, otherwise they will be tested locally.