ODBC
class ODBC (View source)
Constants
| ATTR_CONNECT_TIMEOUT |
Connection attribute to set the connection timeout. |
| ATTR_DEFAULT_FETCH_MODE |
Connection attribute to set the default fetch mode. |
| ATTR_AUTOCOMMIT |
Connection attribute to set auto-commit mode. |
| ATTR_PERSISTENT |
Connection attribute to set persistence of the connection. |
| ATTR_ALIAS_TYPE |
Connection attribute to set the default fetch mode. |
| ATTR_REPORT |
Connection attribute to set the default report mode. |
| ATTR_SQL_CUR_USE |
Connection attribute to set cursor. |
| REPORT_OFF |
Turns reporting off |
| REPORT_ERROR |
Report errors from mysqli function calls |
| REPORT_STRICT |
Throw exception for errors instead of warnings |
| REPORT_INDEX |
Report if no index or bad index was used in a query |
| REPORT_ALL |
Report all errors |
| FETCH_LAZY |
Fetch mode that starts fetching rows only when they are requested. |
| FETCH_ASSOC |
Constant for the fetch mode representing fetching as an associative array |
| FETCH_NUM |
Constant for the fetch mode representing fetching as a numeric array |
| FETCH_BOTH |
Constant for the fetch mode representing fetching as both a numeric and associative array |
| FETCH_OBJ |
Constant for the fetch mode representing fetching as an object |
| FETCH_BOUND |
Fetch mode that requires explicit binding of PHP variables to fetch values. |
| FETCH_COLUMN |
Constant for the fetch mode representing fetching a single column |
| FETCH_CLASS |
Constant for the fetch mode representing fetching into a new instance of a specified class |
| FETCH_INTO |
Constant for the fetch mode representing fetching into an existing object |
| private WIN_CMDLET |
Path to the ODBC cmdlet on Windows. |
| private LINUX_CMDLET |
Path to the ODBC cmdlet on Linux. |
| SQL_CUR_USE_IF_NEEDED |
Path to the ODBC cmdlet on Linux. |
| SQL_CUR_USE_ODBC |
Path to the ODBC cmdlet on Linux. |
| SQL_CUR_USE_DRIVER |
Path to the ODBC cmdlet on Linux. |
Methods
Retrieves the value of a specific attribute by name or constant.
Sets the value of a specific attribute by name or constant.
Sets the type of the input variable based on its value.
fetchArray function description.
Fetches all the rows from the given result set.
Fetches the columns from the given result set and optionally groups them by table name.
Fetches tables from the given database resource and returns an array of table names.
Retrieves the mapper drivers for the ODBC connection.
Retrieves the available drivers on the current system, excluding specified ODBC drivers.
Retrieves the driver settings for a specific driver, based on the operating system.
Retrieves the available drivers on the current system, excluding the specified ODBC drivers.
Retrieves the available drivers on the current system, excluding the specified ODBC drivers.
Get alias by driver.
Details
static mixed
getAttribute(mixed $name)
Retrieves the value of a specific attribute by name or constant.
static void
setAttribute(mixed $name, mixed $value)
Sets the value of a specific attribute by name or constant.
static string|int|bool|float
setType(mixed $input)
Sets the type of the input variable based on its value.
static false|array
fetchArray(mixed $res)
fetchArray function description.
static false|array
fetchAll(mixed $res)
Fetches all the rows from the given result set.
static array
fetchColumns(mixed $resource, string|null $tableName = null)
Fetches the columns from the given result set and optionally groups them by table name.
static array
fetchTables(mixed $resource)
Fetches tables from the given database resource and returns an array of table names.
static array|string
getMapperAliases()
Retrieves the mapper drivers for the ODBC connection.
static array
getDriverSettings()
Retrieves the available drivers on the current system, excluding specified ODBC drivers.
static array
getDriverSettingsByDriver(string $driver)
Retrieves the driver settings for a specific driver, based on the operating system.
This method checks the operating system and calls the appropriate method to get the driver settings.
static array
getAvailableAliases()
Retrieves the available drivers on the current system, excluding the specified ODBC drivers.
static array
getAvailableDrivers()
Retrieves the available drivers on the current system, excluding the specified ODBC drivers.
static array|string
getAliasByDriver(string $driver, string|null $type = null)
Get alias by driver.