Chapter 2: Empress Specific Features


As a general rule, Empress RDBMS interface complies with the standard odbc interface for PHP. This is fully documented in the ODBC Functions chapter of the PHP Manual.

The only item which is specific to Empress in PHP is that there are two methods for specifying the DNS in the odbc_connect () and odbc_pconnect () functions. The connect syntax is:

   odbc_connect (dsn, user_id, password)
   odbc_pconnect (dsn, user_id, password)

For Empress, dsn can be specified as either:

There are advantages and disadvantages to both options. Using the full connection string means that you do not require an ODBC.INI file to access the database. However, if you move the datasource, or change the port on which the RDBMS server listens, you will have to modify every call to the odbc_connect/pconnect function.