PHP Класс PHPFusion\Database\Driver\PDOMySQL

Наследование: extends PHPFusion\Database\AbstractDatabaseDriver
Показать файл Открыть проект

Открытые методы

Метод Описание
_query ( string $query, array $parameters = [] ) : PDOStatement Send a database query
close ( ) Close the connection
count ( string $field, string $table, string $conditions = "", array $parameters = [] ) : integer Count the number of rows in a table filtered by conditions
countRows ( PDOStatement $statement ) : integer Count the number of affected rows by the given query
fetchAssoc ( PDOStatement $statement ) : array Fetch one row as an associative array
fetchFirstColumn ( PDOStatement $statement, integer $row ) : mixed Fetch the first column of a specific row
fetchRow ( PDOStatement $statement ) : array Fetch one row as a numeric array
getLastId ( ) : integer Get the last inserted auto increment id
getServerVersion ( ) : string Get the database server version
isConnected ( ) : boolean
quote ( $value ) : string Implementation of \PDO::quote()

Защищенные методы

Метод Описание
connect ( string $host, string $user, string $pass, string $db, array $options = [] ) Connect to the database

Описание методов

_query() публичный Метод

Send a database query
public _query ( string $query, array $parameters = [] ) : PDOStatement
$query string SQL
$parameters array
Результат PDOStatement or FALSE on error

close() публичный Метод

Close the connection
public close ( )

connect() защищенный Метод

Connect to the database
protected connect ( string $host, string $user, string $pass, string $db, array $options = [] )
$host string Server domain or IP followed by an optional port definition
$user string
$pass string Password
$db string The name of the database
$options array Currently only one option exists: charset

count() публичный Метод

Count the number of rows in a table filtered by conditions
public count ( string $field, string $table, string $conditions = "", array $parameters = [] ) : integer
$field string Parenthesized field name
$table string Table name
$conditions string conditions after "where"
$parameters array
Результат integer

countRows() публичный Метод

Count the number of affected rows by the given query
public countRows ( PDOStatement $statement ) : integer
$statement PDOStatement
Результат integer

fetchAssoc() публичный Метод

Fetch one row as an associative array
public fetchAssoc ( PDOStatement $statement ) : array
$statement PDOStatement
Результат array Associative array

fetchFirstColumn() публичный Метод

Fetch the first column of a specific row
public fetchFirstColumn ( PDOStatement $statement, integer $row ) : mixed
$statement PDOStatement
$row integer
Результат mixed

fetchRow() публичный Метод

Fetch one row as a numeric array
public fetchRow ( PDOStatement $statement ) : array
$statement PDOStatement
Результат array Numeric array

getLastId() публичный Метод

Get the last inserted auto increment id
public getLastId ( ) : integer
Результат integer

getServerVersion() публичный Метод

Get the database server version
public getServerVersion ( ) : string
Результат string

isConnected() публичный Метод

public isConnected ( ) : boolean
Результат boolean TRUE if the connection is alive

quote() публичный Метод

Implementation of \PDO::quote()
См. также: http://php.net/manual/en/pdo.quote.php
public quote ( $value ) : string
$value
Результат string