Before you can build database aware applications, you need to set up things correctly. For the PHsPeed IDE, it means that it needs to access the database to retrieve meta-data like tables and fields. The PHP.ini needs to be set up to include the required database routines so that PHP will connect. For PHP coding, it means that it needs a decent PDO set up to connect. If you are new to PHP coding, this might sound not very clear, but fortunately, you only need to do this once.

1. Setup PHP.Ini to use the required database(s)

This is the easiest step as you can do this from within the IDE itself. Just set the check boxes for the databases you want to support and click apply. This will modify the php.ini and restart the internal web server. To limit the required system resources, do only check the required databases. On larger development systems it might not be an issue, but why load PHP modules you don't need ?

2. Setup the required PDO strings for the databases you want to use.

For MySQL / MariaDB, there is already a pre-set up. But for other databases you must create one yourself. Depending on your database, the parameters might differ (see screenshot at the appropriate databases). But in general, the following rules apply:

Setup a correct local database client that is needed to communicate with your database. That can be a 'simple' client like Oracle, but it might be needed to install an odbc/ado driver, i.e. for SQLSever and Progress Open Edge. The samples on the following pages are based upon the installation of the database on the same system (we use developer editions of Progres, Oracle, PostgreSQL, and SQL Server). You will find the dialog under 'connection/pdo'

3. Setup the required database connection(s).

In the next pages you can find sample setups for the several databases. In all cases, you need to specify some SQL dependencies, as SQL is not a 100% standard. In the case of PHsPeed, you must supply the SQL statement that is required to limit result sets. If you have situations where you use hyphens in your table and/or field names, you must supply a select template that fixes the hyphens for SQL. (If you have control of your data model, avoid using Hyphens, but use underscores).