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:
Data source name
This is the logical database name specified in the ODBC.INI file.
A full connection string, as specified in the ODBC standard. For example:
dsn="DATABASE=db_name;SERVER=server_name;
PORT=server_port"
Note that there are other options for this string. But the three shown above are the most important for use with PHP.
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.