The Pdo\Odbc class
(PHP 8 >= 8.4.0)
Introduction
A PDO subclass representing a connection using the ODBC PDO driver.
Class synopsis
string
$dsn,?string
$username = null,#[\SensitiveParameter] ?string
$password = null,?array
$options = null)
string
$dsn,?string
$username = null,#[\SensitiveParameter] ?string
$password = null,?array
$options = null): static
$query, ?int $fetchMode = PDO::FETCH_COLUMN, int $colno): PDOStatement|falsestring
$query,?int
$fetchMode = PDO::FETCH_CLASS,string
$classname,array
$constructorArgs): PDOStatement|false
$query, ?int $fetchMode = PDO::FETCH_INTO, object $object): PDOStatement|falsePredefined Constants
Pdo\Odbc::ATTR_USE_CURSOR_LIBRARY
This option controls whether the ODBC cursor library is used. The ODBC cursor library supports some advanced ODBC features (e.g. block scrollable cursors), which may not be implemented by the driver. The following values are supported:
Pdo\Odbc::SQL_USE_IF_NEEDED
Use the ODBC cursor library when needed. This is the default.
Pdo\Odbc::SQL_USE_DRIVER
Never use the ODBC cursor library.
Pdo\Odbc::SQL_USE_ODBC
Always use the ODBC cursor library.
Pdo\Odbc::ATTR_ASSUME_UTF8
Windows only.
If true, UTF-16 encoded character data (CHAR,
VARCHAR and LONGVARCHAR)
is converted to UTF-8 when reading from or writing data to the database.
If false (the default), character encoding conversion may be done by the driver.
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
