dba_pdo
- Full name:
\dba_pdo
- Parent class:
\dba_driver
Properties
driver_dbtype
server_version
Methods
connect
public connect(mixed $server, mixed $scheme, mixed $port, mixed $user, mixed $pass, mixed $db, mixed $db_charset): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$server |
mixed | DB server name |
$scheme |
mixed | DB scheme |
$port |
mixed | DB port |
$user |
mixed | DB username |
$pass |
mixed | DB password |
$db |
mixed | database name |
$db_charset |
mixed |
See Also:
- \dba_driver::connect() -
q
Parameters:
Parameter | Type | Description |
---|---|---|
$sql |
mixed | The SQL query to execute |
Return Value:
- \b false if not connected or PDOException occured on query
- \b array with results on a SELECT query
- \b PDOStatement on a non SELECT SQL query
See Also:
- \dba_driver::q() -
insert
Insert a row into a table.
The $data
argument is an array of key/value pairs of the columns to
insert, where the key is the column name. Values are automatically
escaped if needed, and should be provided unescaped to this function.
Parameters:
Parameter | Type | Description |
---|---|---|
$table |
string | The table to insert the row into. |
$data |
array | The data to insert as an array of column name => value pairs. |
$idcol |
string | The column name for the primary key of the table. We need to specify this since we don't have a consistent naming of primary id for tables. |
Return Value:
The complete record as read back from the database, or false if we could not fetch it.
update
Update an existing row in a table.
The $data
argument is an array of key/value pairs of the columns to
update, where the key is the column name. Values are automatically
escaped if needed, and should be provided unescaped to this function.
Parameters:
Parameter | Type | Description |
---|---|---|
$table |
string | The table to update. |
$data |
array | The columns to update as key => value pairs. |
$idcol |
string | The name of the id column to check $idval against. |
$idval |
mixed | The id of the row to update. |
Return Value:
True if the update succeeded, false otherwise.
escape
Parameters:
Parameter | Type | Description |
---|---|---|
$str |
mixed | The string to escape. |
close
concat
Parameters:
Parameter | Type | Description |
---|---|---|
$fld |
mixed | |
$sep |
mixed |
use_index
Parameters:
Parameter | Type | Description |
---|---|---|
$str |
mixed |
str_to_date
Parameters:
Parameter | Type | Description |
---|---|---|
$str |
mixed |
quote_interval
Parameters:
Parameter | Type | Description |
---|---|---|
$txt |
mixed |
escapebin
Parameters:
Parameter | Type | Description |
---|---|---|
$str |
mixed |
unescapebin
Parameters:
Parameter | Type | Description |
---|---|---|
$str |
mixed |
getdriver
Inherited methods
connect
public connect(string $server, string $scheme, string $port, string $user, string $pass, string $db, mixed $db_charset): bool
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$server |
string | DB server name |
$scheme |
string | DB scheme |
$port |
string | DB port |
$user |
string | DB username |
$pass |
string | DB password |
$db |
string | database name |
$db_charset |
mixed |
q
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$sql |
string | The SQL query to execute |
escape
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$str |
string | The string to escape. |
close
- This method is abstract.
getdriver
- This method is abstract.
__construct
public __construct(mixed $server, mixed $scheme, mixed $port, mixed $user, mixed $pass, mixed $db, mixed $db_charset, mixed $install = false): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$server |
mixed | |
$scheme |
mixed | |
$port |
mixed | |
$user |
mixed | |
$pass |
mixed | |
$db |
mixed | |
$db_charset |
mixed | |
$install |
mixed |
get_null_date
get_install_script
get_table_quote
utcnow
install
public install(mixed $server, mixed $scheme, mixed $port, mixed $user, mixed $pass, mixed $db): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$server |
mixed | |
$scheme |
mixed | |
$port |
mixed | |
$user |
mixed | |
$pass |
mixed | |
$db |
mixed |
dbg
Parameters:
Parameter | Type | Description |
---|---|---|
$dbg |
int | 0 to disable debugging |
__destruct
quote_interval
Parameters:
Parameter | Type | Description |
---|---|---|
$txt |
mixed |
optimize_table
Parameters:
Parameter | Type | Description |
---|---|---|
$table |
mixed |
concat
Parameters:
Parameter | Type | Description |
---|---|---|
$fld |
mixed | |
$sep |
mixed |
escapebin
Parameters:
Parameter | Type | Description |
---|---|---|
$str |
mixed |
unescapebin
Parameters:
Parameter | Type | Description |
---|---|---|
$str |
mixed |
Automatically generated on 2025-03-19