PHP Class DByte\DB

Afficher le fichier Open project: xeoncross/dbyte Class Usage Examples

Méthodes publiques

Свойство Type Description
$c
$i
$p
$q

Méthodes publiques

Méthode Description
column ( string $query, array $params = NULL, integer $key ) : array | null Fetch a column offset from the result set (COUNT() queries)
fetch ( string $query, array $params = NULL, integer $column = NULL ) : array Fetch all query result rows
insert ( string $table, array $data ) : integer | null Insert a row into the database
pairs ( string $query, array $params = NULL ) : array Fetches an associative array of all rows as key-value pairs (first column is the key, second column is the value).
query ( string $query, array $params = NULL ) : object | null Prepare and send a query returning the PDOStatement
row ( string $query, array $params = NULL ) : mixed Fetch a single query result row
update ( string $table, array $data, $value, $column = 'id' ) : integer | null Update a database row

Method Details

column() static public méthode

Fetch a column offset from the result set (COUNT() queries)
static public column ( string $query, array $params = NULL, integer $key ) : array | null
$query string query string
$params array query parameters
$key integer index of column offset
Résultat array | null

fetch() static public méthode

Fetch all query result rows
static public fetch ( string $query, array $params = NULL, integer $column = NULL ) : array
$query string query string
$params array query parameters
$column integer the optional column to return
Résultat array

insert() static public méthode

Insert a row into the database
static public insert ( string $table, array $data ) : integer | null
$table string name
$data array
Résultat integer | null

pairs() static public méthode

Fetches an associative array of all rows as key-value pairs (first column is the key, second column is the value).
static public pairs ( string $query, array $params = NULL ) : array
$query string query string
$params array query parameters
Résultat array

query() static public méthode

Prepare and send a query returning the PDOStatement
static public query ( string $query, array $params = NULL ) : object | null
$query string query string
$params array query parameters
Résultat object | null

row() static public méthode

Fetch a single query result row
static public row ( string $query, array $params = NULL ) : mixed
$query string query string
$params array query parameters
Résultat mixed

update() static public méthode

Update a database row
static public update ( string $table, array $data, $value, $column = 'id' ) : integer | null
$table string name
$data array
Résultat integer | null

Property Details

$c static_oe public_oe property

static public $c

$i static_oe public_oe property

static public $i

$p static_oe public_oe property

static public $p

$q static_oe public_oe property

static public $q