Class MySQL
- Alo\Db\AbstractDb
Alo\Db\MySQL
Methods summary
public | #__construct(string$ip= ALO_MYSQL_SERVER,integer$port= ALO_MYSQL_PORT,string$user= ALO_MYSQL_USER,string$pw= ALO_MYSQL_PW,string$db= ALO_MYSQL_DATABASE,string$cache= ALO_MYSQL_CACHE,array$options=null) Instantiates the database connection Instantiates the database connection Parameters- $ip
string $ip The IP address to use- $port
integer $port The port to use- $user
string $user The username- $pw
string $pw The password- $db
string $db The database to use- $cache
string $cache Which cache interface to use- $options
array $options Connection options
AuthorOverrides |
public staticAlo\Db\MySQL | #mysql(string$ip= ALO_MYSQL_SERVER,integer$port= ALO_MYSQL_PORT,string$user= ALO_MYSQL_USER,string$pw= ALO_MYSQL_PW,string$db= ALO_MYSQL_DATABASE,string$cache= ALO_MYSQL_CACHE,array$options=null) Instantiates the database connection Instantiates the database connection Parameters- $ip
string $ip The IP address to use- $port
integer $port The port to use- $user
string $user The username- $pw
string $pw The password- $db
string $db The database to use- $cache
string $cache Which cache interface to use- $options
array $options Connection options
ReturnsAuthor |
public integer|float | #aggregate(string$sql,array$params=null,array$settings= []) Returns an aggregated one-column result set, e.g. from a count(*) query Returns an aggregated one-column result set, e.g. from a count(*) query Parameters- $sql
string $sql The SQL code- $params
array $params Bound parameters- $settings
array $settings Optional settings
Returnsinteger|float
Author |
public array|boolean | #prepQuery(string$sql,array$params=null,array$settings= []) Executes a prepared query and returns the results Executes a prepared query and returns the results Parameters- $sql
string $sql The SQL code- $params
array $params Bound parameters- $settings
array $settings Optional settings
Returnsarray|boolean Result array on SELECT queries, TRUE/FALSE for others
Author |
publicAlo\Db\MySQL | |
publicAlo\Db\MySQL | #commit( ) Commits a transaction ReturnsAuthor |
publicPDOStatement | #prepare(string$sql) Prepares a statement Parameters- $sql
string $sql A SQL statement to prepare
ReturnsAuthor |
public array|boolean | #query(string$sql) Executes a quick unescaped query without preparing it Executes a quick unescaped query without preparing it ParametersReturnsarray|boolean Result array on SELECT queries, TRUE/FALSE for others
Author |
publicAlo\Db\MySQL | #rollBack( ) Rolls back a transaction ReturnsAuthor |
public boolean | #transactionActive( ) Checks whether a transaction is active Checks whether a transaction is active Returnsboolean
Author |
public mixed | #__call(string$name,array$arguments) Handles direct calls to PDO Handles direct calls to PDO Parameters- $name
string $name Method name- $arguments
array $arguments Array of parameters
Returnsmixed
Author |
getLastHash()
,hash()
Magic methods summary
Constants summary
V_CACHE
,V_FETCH_NUM
,V_PREFIX
,V_TIME
Properties summary
$cache
,$cachePrefix
,$defaultSettings
,$lastHash
,$this