CustomAdodbPdo
extends ADODB_pdo
in package
This class is needed in order to make AdoDB use an existing PDO connection
Tags
Table of Contents
Methods
- __construct() : mixed
- Initializes Adodb with an existing PDO connection
- _query() : mixed
- Returns the queryID or false
- getPreparedQuery() : string
- Returns the SQL query string with bound parameters interpolated.
- logErrorToDBG() : void
- Log query error to DBG
Methods
__construct()
Initializes Adodb with an existing PDO connection
public
__construct(PDO $pdo) : mixed
Parameters
- $pdo : PDO
-
PDO connection to use
_query()
Returns the queryID or false
public
_query(mixed $sql[, mixed $inputarr = false ]) : mixed
Parameters
- $sql : mixed
- $inputarr : mixed = false
Return values
mixed —queryID or false
getPreparedQuery()
Returns the SQL query string with bound parameters interpolated.
protected
getPreparedQuery(PDOStatement $statement, array<string|int, mixed> $params) : string
Parameters
- $statement : PDOStatement
-
The prepared PDO statement.
- $params : array<string|int, mixed>
-
The parameters to bind into the SQL query.
Return values
string —The SQL query string with parameters inserted.
logErrorToDBG()
Log query error to DBG
protected
logErrorToDBG(array<string|int, mixed> $errorInfo) : void
Parameters
- $errorInfo : array<string|int, mixed>
-
Return value of PDO::errorInfo() or PDOStatement::errorInfo().