- Class name: DbMySQLiCore
- Parent class: Db
- Source: classes/db/DbMySQLi.php line 31
- $_servers
- $database
- $instance
- $is_cache_enabled
- $last_cached
- $last_query
- $link
- $password
- $result
- $server
- $user
- Affected_Rows
- Insert_ID
- __construct
- __destruct
- _escape
- _numRows
- _query
- autoExecute
- autoExecuteWithNullValues
- checkConnection
- checkEncoding
- connect
- delete
- disconnect
- displayError
- ds
- escape
- execute
- executeS
- getClass
- getInstance
- getMsgError
- getNumberError
- getRow
- getValue
- getVersion
- nextRow
- numRows
- ps
- q
- query
- s
- set_db
- tryToConnect
- tryUTF8
protected array $_servers = array(array('server' => _DB_SERVER_, 'user' => _DB_USER_, 'password' => _DB_PASSWD_, 'database' => _DB_NAME_))
- Visibility: protected
- This property is static.
- This property is defined by DbCore.
- Source: classes/db/Db.php line 76.
protected string $database
- Visibility: protected
- This property is defined by DbCore.
- Source: classes/db/Db.php line 51.
protected array $instance = array()
- Visibility: protected
- This property is static.
- This property is defined by DbCore.
- Source: classes/db/Db.php line 71.
protected boolean $is_cache_enabled
- Visibility: protected
- This property is defined by DbCore.
- Source: classes/db/Db.php line 56.
protected string $last_cached
Last cached query
- Visibility: protected
- This property is defined by DbCore.
- Source: classes/db/Db.php line 95.
protected string $last_query
Store last executed query
- Visibility: protected
- This property is defined by DbCore.
- Source: classes/db/Db.php line 88.
protected mixed $link
- Visibility: protected
- This property is defined by DbCore.
- Source: classes/db/Db.php line 61.
protected string $password
- Visibility: protected
- This property is defined by DbCore.
- Source: classes/db/Db.php line 46.
protected mixed $result
- Visibility: protected
- This property is defined by DbCore.
- Source: classes/db/Db.php line 66.
protected string $server
- Visibility: protected
- This property is defined by DbCore.
- Source: classes/db/Db.php line 36.
protected string $user
- Visibility: protected
- This property is defined by DbCore.
- Source: classes/db/Db.php line 41.
mixed DbMySQLiCore::Affected_Rows()
- Visibility: public
- Source: classes/db/DbMySQLi.php line 96
mixed DbMySQLiCore::Insert_ID()
- Visibility: public
- Source: classes/db/DbMySQLi.php line 88
mixed DbCore::__construct(string $server, string $user, string $password, string $database, boolean $connect)
Instantiate database connection
- Visibility: public
- This method is defined by DbCore.
- Source: classes/db/Db.php line 224
- $server string - Server address
- $user string - User login
- $password string - User password
- $database string - Database name
- $connect boolean - If false, don't connect in constructor (since 1.5.0)
mixed DbCore::__destruct()
Close connection to database
- Visibility: public
- This method is defined by DbCore.
- Source: classes/db/Db.php line 242
mixed DbMySQLiCore::_escape($str)
- Visibility: public
- Source: classes/db/DbMySQLi.php line 128
- $str mixed
mixed DbMySQLiCore::_numRows($result)
- Visibility: protected
- Source: classes/db/DbMySQLi.php line 80
- $result mixed
mixed DbMySQLiCore::_query($sql)
- Visibility: protected
- Source: classes/db/DbMySQLi.php line 62
- $sql mixed
mixed|boolean DbCore::autoExecute(string $table, string $data, string $type, string $where, integer $limit, boolean $use_cache, boolean $use_null)
Filter SQL query within a blacklist
- Visibility: public
- This method is defined by DbCore.
- Source: classes/db/Db.php line 260
- $table string - Table where insert/update data
- $data string - Data to insert/update
- $type string - INSERT or INSERT IGNORE or REPLACE or UPDATE
- $where string - WHERE clause, only for UPDATE (optional)
- $limit integer - LIMIT clause (optional)
- $use_cache boolean
- $use_null boolean - If true, replace empty strings and NULL by a NULL value
mixed|boolean DbCore::autoExecuteWithNullValues(string $table, string $values, string $type, string $where, integer $limit)
Filter SQL query within a blacklist
- Visibility: public
- This method is defined by DbCore.
- Source: classes/db/Db.php line 341
- $table string - Table where insert/update data
- $values string - Data to insert/update
- $type string - INSERT or UPDATE
- $where string - WHERE clause, only for UPDATE (optional)
- $limit integer - LIMIT clause (optional)
integer DbCore::checkConnection(string $server, string $user, string $pwd, string $db, boolean $new_db_link, boolean $engine)
Try a connection to te database
- Visibility: public
- This method is static.
- This method is defined by DbCore.
- Source: classes/db/Db.php line 586
- $server string - Server address
- $user string - Login for database connection
- $pwd string - Password for database connection
- $db string - Database name
- $new_db_link boolean
- $engine boolean
integer DbCore::checkEncoding(string $server, string $user, string $pwd)
Try a connection to te database
- Visibility: public
- This method is static.
- This method is defined by DbCore.
- Source: classes/db/Db.php line 599
- $server string - Server address
- $user string - Login for database connection
- $pwd string - Password for database connection
mixed DbMySQLiCore::connect()
- Visibility: public
- Source: classes/db/DbMySQLi.php line 36
boolean DbCore::delete(string $table, string $where, integer $limit, boolean $use_cache)
Execute a DELETE query
- Visibility: public
- This method is defined by DbCore.
- Source: classes/db/Db.php line 372
- $table string - Name of the table to delete
- $where string - WHERE clause on query
- $limit integer - Number max of rows to delete
- $use_cache boolean - Use cache or not
mixed DbMySQLiCore::disconnect()
- Visibility: public
- Source: classes/db/DbMySQLi.php line 54
mixed DbCore::displayError(boolean $sql)
Display last SQL error
- Visibility: public
- This method is defined by DbCore.
- Source: classes/db/Db.php line 539
- $sql boolean
mixed DbCore::ds($sql, $use_cache)
- Visibility: public
- This method is static.
- This method is defined by DbCore.
- Source: classes/db/Db.php line 616
- $sql mixed
- $use_cache mixed
string DbCore::escape(string $string, boolean $html_ok)
Sanitize data which will be injected into SQL query
- Visibility: public
- This method is defined by DbCore.
- Source: classes/db/Db.php line 561
- $string string - SQL data which will be injected into SQL query
- $html_ok boolean - Does data contain HTML code ? (optional)
boolean DbCore::execute(string $sql, boolean $use_cache)
Execute a query
- Visibility: public
- This method is defined by DbCore.
- Source: classes/db/Db.php line 389
- $sql string
- $use_cache boolean
array DbCore::executeS(string $sql, boolean $array, boolean $use_cache)
ExecuteS return the result of $sql as array
- Visibility: public
- This method is defined by DbCore.
- Source: classes/db/Db.php line 408
- $sql string - query to execute
- $array boolean - return an array instead of a mysql_result object (deprecated since 1.5.0, use query method instead)
- $use_cache boolean - if query has been already executed, use its result
string DbCore::getClass()
Get child layer class
- Visibility: public
- This method is static.
- This method is defined by DbCore.
- Source: classes/db/Db.php line 205
\Db DbCore::getInstance(boolean $master)
Get Db object instance
- Visibility: public
- This method is static.
- This method is defined by DbCore.
- Source: classes/db/Db.php line 173
- $master boolean - Decides wether the connection to be returned by the master server or the slave server
mixed DbMySQLiCore::getMsgError($query)
- Visibility: public
- Source: classes/db/DbMySQLi.php line 104
- $query mixed
mixed DbMySQLiCore::getNumberError()
- Visibility: public
- Source: classes/db/DbMySQLi.php line 112
array DbCore::getRow(mixed $sql, boolean $use_cache)
getRow return an associative array containing the first row of the query This function automatically add "limit 1" to the query
- Visibility: public
- This method is defined by DbCore.
- Source: classes/db/Db.php line 454
- $sql mixed - the select query (without "LIMIT 1")
- $use_cache boolean - find it in cache first
mixed DbCore::getValue(mixed $sql, boolean $use_cache)
getValue return the first item of a select query.
- Visibility: public
- This method is defined by DbCore.
- Source: classes/db/Db.php line 486
- $sql mixed
- $use_cache boolean
mixed DbMySQLiCore::getVersion()
- Visibility: public
- Source: classes/db/DbMySQLi.php line 120
mixed DbMySQLiCore::nextRow($result)
- Visibility: public
- Source: classes/db/DbMySQLi.php line 70
- $result mixed
integer DbCore::numRows()
Get number of rows for last result
- Visibility: public
- This method is defined by DbCore.
- Source: classes/db/Db.php line 501
mixed DbCore::ps($sql, $use_cache)
- Visibility: public
- This method is static.
- This method is defined by DbCore.
- Source: classes/db/Db.php line 609
- $sql mixed
- $use_cache mixed
mixed DbCore::q(string $sql, boolean $use_cache)
Execute a query
- Visibility: protected
- This method is defined by DbCore.
- Source: classes/db/Db.php line 522
- $sql string
- $use_cache boolean
mixed DbCore::query(string $sql)
Execute a query and get result ressource
- Visibility: public
- This method is defined by DbCore.
- Source: classes/db/Db.php line 352
- $sql string
mixed DbCore::s($sql, $use_cache)
- Visibility: public
- This method is static.
- This method is defined by DbCore.
- Source: classes/db/Db.php line 604
- $sql mixed
- $use_cache mixed
mixed DbMySQLiCore::set_db($db_name)
- Visibility: public
- Source: classes/db/DbMySQLi.php line 136
- $db_name mixed
mixed DbMySQLiCore::tryToConnect($server, $user, $pwd, $db, $newDbLink, $engine)
- Visibility: public
- This method is static.
- Source: classes/db/DbMySQLi.php line 141
- $server mixed
- $user mixed
- $pwd mixed
- $db mixed
- $newDbLink mixed
- $engine mixed
mixed DbMySQLiCore::tryUTF8($server, $user, $pwd)
- Visibility: public
- This method is static.
- Source: classes/db/DbMySQLi.php line 161
- $server mixed
- $user mixed
- $pwd mixed