| [ Index ] |
PHP Cross Reference of YOURLS |
[Source view] [Print] [Project Stats]
This file is part of Aura for PHP.
| License: | https://opensource.org/licenses/MIT MIT |
| File Size: | 213 lines (5 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
PdoInterface:: (15 methods):
beginTransaction()
commit()
connect()
errorCode()
errorInfo()
exec()
getAttribute()
getAvailableDrivers()
inTransaction()
lastInsertId()
prepare()
query()
quote()
rollBack()
setAttribute()
Interface: PdoInterface - X-Ref
An interface to the native PDO object.| beginTransaction() X-Ref |
| Begins a transaction and turns off autocommit mode. return: bool True on success, false on failure. |
| commit() X-Ref |
| Commits the existing transaction and restores autocommit mode. return: bool True on success, false on failure. |
| connect(string $dsn,?string $username = null,?array $options = null) X-Ref |
| Introduced in 6.x due to PHP 8.4 change. This is a BC break for Aura.Sql. param: string $dsn The Data Source Name, or DSN, contains the information required to connect to the database. param: string | null $username The user name for the DSN string. This parameter is optional for some PDO drivers. param: string | null $password The password for the DSN string. This parameter is optional for some PDO drivers. param: array | null $options A key=>value array of driver-specific connection options. return: \PDO Returns an instance of a generic PDO instance. |
| errorCode() X-Ref |
| Gets the most recent error code. return: string|null |
| errorInfo() X-Ref |
| Gets the most recent error info. return: array |
| exec(string $statement) X-Ref |
| Executes an SQL statement and returns the number of affected rows. param: string $statement The SQL statement to execute. return: int|false The number of rows affected. |
| getAttribute(int $attribute) X-Ref |
| Gets a PDO attribute value. param: int $attribute The PDO::ATTR_* constant. return: bool|int|string|array|null The value for the attribute. |
| getAvailableDrivers() X-Ref |
| Returns all currently available PDO drivers. return: array |
| inTransaction() X-Ref |
| Is a transaction currently active? return: bool |
| lastInsertId(?string $name = null) X-Ref |
| Returns the last inserted autoincrement sequence value. param: string|null $name The name of the sequence to check; typically needed return: string|false |
| prepare(string $query, array $options = []) X-Ref |
| Prepares an SQL statement for execution. param: string $query The SQL statement to prepare for execution. param: array $options Set these attributes on the returned return: \PDOStatement|false |
| query(string $query, ?int $fetchMode = null, ...$fetch_mode_args) X-Ref |
| Queries the database and returns a PDOStatement. param: string $query The SQL statement to prepare and execute. param: int|null $fetchMode param: mixed ...$fetch_mode_args Optional fetch-related parameters. return: \PDOStatement|false |
| quote(string|int|array|float|null $value, int $type = PDO::PARAM_STR) X-Ref |
| Quotes a value for use in an SQL statement. param: string|int|array|float|null $value The value to quote. param: int $type A data type hint for the database driver. return: string|false The quoted value. |
| rollBack() X-Ref |
| Rolls back the current transaction and restores autocommit mode. return: bool True on success, false on failure. |
| setAttribute(int $attribute, mixed $value) X-Ref |
| Sets a PDO attribute value. param: int $attribute The PDO::ATTR_* constant. param: mixed $value The value for the attribute. return: bool |
| Generated: Wed Nov 5 05:10:36 2025 | Cross-referenced by PHPXref 0.7.1 |