diff options
Diffstat (limited to 'phpBB/phpbb/db/driver/mysql.php')
-rw-r--r-- | phpBB/phpbb/db/driver/mysql.php | 41 |
1 files changed, 12 insertions, 29 deletions
diff --git a/phpBB/phpbb/db/driver/mysql.php b/phpBB/phpbb/db/driver/mysql.php index f3744ac09d..1a4fd364df 100644 --- a/phpBB/phpbb/db/driver/mysql.php +++ b/phpBB/phpbb/db/driver/mysql.php @@ -7,13 +7,7 @@ * */ -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} +namespace phpbb\db\driver; /** * MySQL4 Database Abstraction Layer @@ -24,14 +18,13 @@ if (!defined('IN_PHPBB')) * MySQL 5.0+ * @package dbal */ -class phpbb_db_driver_mysql extends phpbb_db_driver_mysql_base +class mysql extends \phpbb\db\driver\mysql_base { var $multi_insert = true; var $connect_error = ''; /** - * Connect to server - * @access public + * {@inheritDoc} */ function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false) { @@ -109,10 +102,7 @@ class phpbb_db_driver_mysql 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) { @@ -160,13 +150,7 @@ class phpbb_db_driver_mysql 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) { @@ -219,7 +203,7 @@ class phpbb_db_driver_mysql extends phpbb_db_driver_mysql_base } /** - * Return number of affected rows + * {@inheritDoc} */ function sql_affectedrows() { @@ -227,7 +211,7 @@ class phpbb_db_driver_mysql extends phpbb_db_driver_mysql_base } /** - * Fetch current row + * {@inheritDoc} */ function sql_fetchrow($query_id = false) { @@ -247,8 +231,7 @@ class phpbb_db_driver_mysql extends phpbb_db_driver_mysql_base } /** - * Seek to given row number - * rownum is zero-based + * {@inheritDoc} */ function sql_rowseek($rownum, &$query_id) { @@ -268,7 +251,7 @@ class phpbb_db_driver_mysql extends phpbb_db_driver_mysql_base } /** - * Get last inserted id after insert statement + * {@inheritDoc} */ function sql_nextid() { @@ -276,7 +259,7 @@ class phpbb_db_driver_mysql extends phpbb_db_driver_mysql_base } /** - * Free sql result + * {@inheritDoc} */ function sql_freeresult($query_id = false) { @@ -287,7 +270,7 @@ class phpbb_db_driver_mysql extends phpbb_db_driver_mysql_base $query_id = $this->query_result; } - if ($cache && $cache->sql_exists($query_id)) + if ($cache && !is_object($query_id) && $cache->sql_exists($query_id)) { return $cache->sql_freeresult($query_id); } @@ -302,7 +285,7 @@ class phpbb_db_driver_mysql extends phpbb_db_driver_mysql_base } /** - * Escape string used in sql query + * {@inheritDoc} */ function sql_escape($msg) { |