ODBC (Unified)

Introduction

The ODBC extension allows using ODBC database drivers from PHP, using the same functions in PHP for any driver.

The following drivers and driver managers have direct support: » IBM DB2, » iODBC, and » unixODBC. A user-defined driver, such as Sybase SQL Anywhere, can also be linked directly via --with-custom-odbc.

Versions of PHP before 8.5 supported using these databases directly: » Adabas D, DBMaker, Empress, and » Solid.

Note:

It is strongly recommended to use a driver manager like iODBC or unixODBC with PHP. While a driver can be used directly with the ODBC extension through building against it directly, a driver manager provides better flexibility and compatibility. On Windows, the system driver manager is always used.