(PHP 8 >= 8.4.0)
A PDO subclass representing a connection using the ODBC PDO driver.
$dsn,$username = null,$password = null,$options = nullpublic PDO::beginTransaction(): bool
public PDO::commit(): bool
public static PDO::connect( string $dsn, ?string $username = null, #[\SensitiveParameter] ?string $password = null, ?array $options = null ): static
public PDO::errorCode(): ?string
public PDO::errorInfo(): array
public PDO::exec(string $statement): int|false
public PDO::getAttribute(int $attribute): mixed
public static PDO::getAvailableDrivers(): array
public PDO::inTransaction(): bool
public PDO::lastInsertId(?string $name = null): string|false
public PDO::prepare(string $query, array $options = []): PDOStatement|false
public PDO::query(string $query, ?int $fetchMode = null): PDOStatement|false
public PDO::query(string $query, ?int $fetchMode = PDO::FETCH_COLUMN, int $colno): PDOStatement|false
public PDO::query( 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|false
public PDO::quote(string $string, int $type = PDO::PARAM_STR): string|false
public PDO::rollBack(): bool
public PDO::setAttribute(int $attribute, mixed $value): bool}
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_NEEDEDPdo\Odbc::SQL_USE_DRIVERPdo\Odbc::SQL_USE_ODBCPdo\Odbc::ATTR_ASSUME_UTF8true, 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.
© 1997–2025 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/class.pdo-odbc.php