aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db/driver/mysqli.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/db/driver/mysqli.php')
-rw-r--r--phpBB/phpbb/db/driver/mysqli.php46
1 files changed, 15 insertions, 31 deletions
diff --git a/phpBB/phpbb/db/driver/mysqli.php b/phpBB/phpbb/db/driver/mysqli.php
index 0f7a73ee6e..6814599b24 100644
--- a/phpBB/phpbb/db/driver/mysqli.php
+++ b/phpBB/phpbb/db/driver/mysqli.php
@@ -7,13 +7,7 @@
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
+namespace phpbb\db\driver;
/**
* MySQLi Database Abstraction Layer
@@ -21,15 +15,15 @@ if (!defined('IN_PHPBB'))
* MySQL 4.1+ or MySQL 5.0+
* @package dbal
*/
-class phpbb_db_driver_mysqli extends phpbb_db_driver_mysql_base
+class mysqli extends \phpbb\db\driver\mysql_base
{
var $multi_insert = true;
var $connect_error = '';
/**
- * Connect to server
+ * {@inheritDoc}
*/
- function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false , $new_link = false)
+ function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false)
{
if (!function_exists('mysqli_connect'))
{
@@ -45,11 +39,11 @@ class phpbb_db_driver_mysqli extends phpbb_db_driver_mysql_base
$this->server = ($this->persistency) ? 'p:' . (($sqlserver) ? $sqlserver : 'localhost') : $sqlserver;
$this->dbname = $database;
- $port = (!$port) ? NULL : $port;
+ $port = (!$port) ? null : $port;
// If port is set and it is not numeric, most likely mysqli socket is set.
// Try to map it to the $socket parameter.
- $socket = NULL;
+ $socket = null;
if ($port)
{
if (is_numeric($port))
@@ -59,7 +53,7 @@ class phpbb_db_driver_mysqli extends phpbb_db_driver_mysql_base
else
{
$socket = $port;
- $port = NULL;
+ $port = null;
}
}
@@ -102,10 +96,7 @@ class phpbb_db_driver_mysqli extends phpbb_db_driver_mysql_base
}
/**
- * Version information about used database
- * @param bool $raw if true, only return the fetched sql_server_version
- * @param bool $use_cache If true, it is safe to retrieve the value from the cache
- * @return string sql server version
+ * {@inheritDoc}
*/
function sql_server_info($raw = false, $use_cache = true)
{
@@ -157,13 +148,7 @@ class phpbb_db_driver_mysqli extends phpbb_db_driver_mysql_base
}
/**
- * Base query method
- *
- * @param string $query Contains the SQL query which shall be executed
- * @param int $cache_ttl Either 0 to avoid caching or the time in seconds which the result shall be kept in cache
- * @return mixed When casted to bool the returned value returns true on success and false on failure
- *
- * @access public
+ * {@inheritDoc}
*/
function sql_query($query = '', $cache_ttl = 0)
{
@@ -211,7 +196,7 @@ class phpbb_db_driver_mysqli extends phpbb_db_driver_mysql_base
}
/**
- * Return number of affected rows
+ * {@inheritDoc}
*/
function sql_affectedrows()
{
@@ -219,7 +204,7 @@ class phpbb_db_driver_mysqli extends phpbb_db_driver_mysql_base
}
/**
- * Fetch current row
+ * {@inheritDoc}
*/
function sql_fetchrow($query_id = false)
{
@@ -245,8 +230,7 @@ class phpbb_db_driver_mysqli extends phpbb_db_driver_mysql_base
}
/**
- * Seek to given row number
- * rownum is zero-based
+ * {@inheritDoc}
*/
function sql_rowseek($rownum, &$query_id)
{
@@ -266,7 +250,7 @@ class phpbb_db_driver_mysqli extends phpbb_db_driver_mysql_base
}
/**
- * Get last inserted id after insert statement
+ * {@inheritDoc}
*/
function sql_nextid()
{
@@ -274,7 +258,7 @@ class phpbb_db_driver_mysqli extends phpbb_db_driver_mysql_base
}
/**
- * Free sql result
+ * {@inheritDoc}
*/
function sql_freeresult($query_id = false)
{
@@ -294,7 +278,7 @@ class phpbb_db_driver_mysqli extends phpbb_db_driver_mysql_base
}
/**
- * Escape string used in sql query
+ * {@inheritDoc}
*/
function sql_escape($msg)
{