Fat-Free Framework
3.1.0 API Reference
|
DB\SQL Class Reference
PDO wrapper. More...
Inheritance diagram for DB\SQL:
Public Member Functions | |
begin () | |
rollback () | |
commit () | |
type ($val) | |
exec ($cmds, $args=NULL, $ttl=0, $log=TRUE) | |
count () | |
log () | |
schema ($table, $ttl=0) | |
quote ($val, $type=\PDO::PARAM_STR) | |
driver () | |
version () | |
name () | |
quotekey ($key) | |
__construct ($dsn, $user=NULL, $pw=NULL, array $options=NULL) | |
Public Attributes | |
$dbname | |
Database name. | |
$trans =FALSE | |
Transaction flag. | |
$rows =0 | |
Number of rows affected by query. | |
$log | |
SQL log. | |
Detailed Description
PDO wrapper.
Constructor & Destructor Documentation
DB\SQL::__construct | ( | $dsn, | |
$user = NULL , |
|||
$pw = NULL , |
|||
array | $options = NULL |
||
) |
Instantiate class
- Parameters
-
$dsn string $user string $pw string $options array
Member Function Documentation
DB\SQL::begin | ( | ) |
Begin SQL transaction
- Returns
- bool
DB\SQL::commit | ( | ) |
Commit SQL transaction
- Returns
- bool
DB\SQL::count | ( | ) |
Return number of rows affected by last query
- Returns
- int
DB\SQL::driver | ( | ) |
Return database engine
- Returns
- string
DB\SQL::exec | ( | $cmds, | |
$args = NULL , |
|||
$ttl = 0 , |
|||
$log = TRUE |
|||
) |
Execute SQL statement(s)
- Returns
- array|int|FALSE
- Parameters
-
$cmds string|array $args string|array $ttl int $log bool
DB\SQL::log | ( | ) |
Return SQL profiler results
- Returns
- string
DB\SQL::name | ( | ) |
Return database name
- Returns
- string
DB\SQL::quote | ( | $val, | |
$type = \PDO::PARAM_STR |
|||
) |
Quote string
- Returns
- string
- Parameters
-
$val mixed $type int
DB\SQL::quotekey | ( | $key) |
Return quoted identifier name
- Returns
- string
- Parameters
-
$key
DB\SQL::rollback | ( | ) |
Rollback SQL transaction
- Returns
- bool
DB\SQL::schema | ( | $table, | |
$ttl = 0 |
|||
) |
Retrieve schema of SQL table
- Returns
- array|FALSE
- Parameters
-
$table string $ttl int
DB\SQL::type | ( | $val) |
Map data type of argument to a PDO constant
- Returns
- int
- Parameters
-
$val scalar
DB\SQL::version | ( | ) |
Return server version
- Returns
- string
The documentation for this class was generated from the following file:
- db/sql.php
Generated on Mon Aug 19 2013 21:28:01 for Fat-Free Framework by 1.8.4