The Pdo\Odbc class
(PHP 8 >= 8.4.0)
Introduction
A PDO subclass representing a connection using the ODBC PDO driver.
Class synopsis
namespace Pdo;
/* Inherited constants */
/* Constants */
/* Inherited methods */
public PDO::__construct(
string
?string
#[\SensitiveParameter] ?string
?array
)
string
$dsn,?string
$username = null,#[\SensitiveParameter] ?string
$password = null,?array
$options = null)
public static PDO::connect(
string
?string
#[\SensitiveParameter] ?string
?array
): static
string
$dsn,?string
$username = null,#[\SensitiveParameter] ?string
$password = null,?array
$options = null): static
public PDO::query(string
$query, ?int $fetchMode = PDO::FETCH_COLUMN, int $colno): PDOStatement|falsepublic PDO::query(
string
?int
string
array
): PDOStatement|false
string
$query,?int
$fetchMode = PDO::FETCH_CLASS,string
$classname,array
$constructorArgs): PDOStatement|false
public PDO::query(string
}$query, ?int $fetchMode = PDO::FETCH_INTO, object $object): PDOStatement|falsePredefined Constants
Pdo\Odbc::ATTR_USE_CURSOR_LIBRARYThis 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,VARCHARandLONGVARCHAR) is converted to UTF-8 when reading from or writing data to the database. Iffalse(the default), character encoding conversion may be done by the driver.
↑ and ↓ to navigate • Enter to select • Esc to close • / to open