mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
- tackle some usability issues
- fix bug #3147 - added the lock-images made by SHS` - fixed MSSQL errors (adding the correct ESCAPE sequence) git-svn-id: file:///svn/phpbb/trunk@6161 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -32,6 +32,7 @@ if (!defined('SQL_LAYER'))
|
||||
class dbal_firebird extends dbal
|
||||
{
|
||||
var $last_query_text = '';
|
||||
var $service_handle = false;
|
||||
|
||||
/**
|
||||
* Connect to server
|
||||
@@ -45,9 +46,27 @@ class dbal_firebird extends dbal
|
||||
|
||||
$this->db_connect_id = ($this->persistency) ? @ibase_pconnect($this->server . ':' . $this->dbname, $this->user, $sqlpassword, false, false, 3) : @ibase_connect($this->server . ':' . $this->dbname, $this->user, $sqlpassword, false, false, 3);
|
||||
|
||||
/**
|
||||
* @todo evaluate the implications of opening a service connection
|
||||
*/
|
||||
$this->service_handle = @ibase_service_attach($this->server, $this->user, $sqlpassword);
|
||||
|
||||
return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error('');
|
||||
}
|
||||
|
||||
/**
|
||||
* Version information about used database
|
||||
*/
|
||||
function sql_server_info()
|
||||
{
|
||||
if ($this->service_handle !== false)
|
||||
{
|
||||
return @ibase_server_info($this->service_handle, IBASE_SVC_SERVER_VERSION);
|
||||
}
|
||||
|
||||
return 'Firebird/Interbase';
|
||||
}
|
||||
|
||||
/**
|
||||
* SQL Transaction
|
||||
* @access: private
|
||||
@@ -323,6 +342,11 @@ class dbal_firebird extends dbal
|
||||
*/
|
||||
function _sql_close()
|
||||
{
|
||||
if ($this->service_handle !== false)
|
||||
{
|
||||
@ibase_service_detach($this->service_handle);
|
||||
}
|
||||
|
||||
return @ibase_close($this->db_connect_id);
|
||||
}
|
||||
|
||||
|
@@ -55,6 +55,28 @@ class dbal_mssql extends dbal
|
||||
return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error('');
|
||||
}
|
||||
|
||||
/**
|
||||
* Version information about used database
|
||||
*/
|
||||
function sql_server_info()
|
||||
{
|
||||
$result_id = @mssql_query("SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY('productlevel'), SERVERPROPERTY('edition')", $this->db_connect_id);
|
||||
|
||||
$row = false;
|
||||
if ($result_id)
|
||||
{
|
||||
$row = @mssql_fetch_assoc($result_id);
|
||||
@mssql_free_result($result_id);
|
||||
}
|
||||
|
||||
if ($row)
|
||||
{
|
||||
return 'MSSQL<br />' . implode(' ', $row);
|
||||
}
|
||||
|
||||
return 'MSSQL';
|
||||
}
|
||||
|
||||
/**
|
||||
* SQL Transaction
|
||||
* @access: private
|
||||
|
@@ -49,6 +49,28 @@ class dbal_mssql_odbc extends dbal
|
||||
return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error('');
|
||||
}
|
||||
|
||||
/**
|
||||
* Version information about used database
|
||||
*/
|
||||
function sql_server_info()
|
||||
{
|
||||
$result_id = @odbc_exec($this->db_connect_id, "SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY('productlevel'), SERVERPROPERTY('edition')");
|
||||
|
||||
$row = false;
|
||||
if ($result_id)
|
||||
{
|
||||
$row = @odbc_fetch_array($result_id);
|
||||
@odbc_free_result($result_id);
|
||||
}
|
||||
|
||||
if ($row)
|
||||
{
|
||||
return 'MSSQL (ODBC)<br />' . implode(' ', $row);
|
||||
}
|
||||
|
||||
return 'MSSQL (ODBC)';
|
||||
}
|
||||
|
||||
/**
|
||||
* SQL Transaction
|
||||
* @access: private
|
||||
|
@@ -55,6 +55,14 @@ class dbal_mysql extends dbal
|
||||
return $this->sql_error('');
|
||||
}
|
||||
|
||||
/**
|
||||
* Version information about used database
|
||||
*/
|
||||
function sql_server_info()
|
||||
{
|
||||
return 'MySQL ' . @mysql_get_server_info($this->db_connect_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* SQL Transaction
|
||||
* @access: private
|
||||
|
@@ -57,6 +57,14 @@ class dbal_mysql4 extends dbal
|
||||
return $this->sql_error('');
|
||||
}
|
||||
|
||||
/**
|
||||
* Version information about used database
|
||||
*/
|
||||
function sql_server_info()
|
||||
{
|
||||
return 'MySQL ' . @mysql_get_server_info($this->db_connect_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* SQL Transaction
|
||||
* @access: private
|
||||
|
@@ -57,6 +57,14 @@ class dbal_mysqli extends dbal
|
||||
return $this->sql_error('');
|
||||
}
|
||||
|
||||
/**
|
||||
* Version information about used database
|
||||
*/
|
||||
function sql_server_info()
|
||||
{
|
||||
return 'MySQL(i) ' . @mysqli_get_server_info($this->db_connect_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* SQL Transaction
|
||||
* @access: private
|
||||
|
@@ -47,6 +47,14 @@ class dbal_oracle extends dbal
|
||||
return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error('');
|
||||
}
|
||||
|
||||
/**
|
||||
* Version information about used database
|
||||
*/
|
||||
function sql_server_info()
|
||||
{
|
||||
return 'Oracle ' . @ociserverversion($this->db_connect_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* SQL Transaction
|
||||
* @access: private
|
||||
|
@@ -84,6 +84,16 @@ class dbal_postgres extends dbal
|
||||
return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error('');
|
||||
}
|
||||
|
||||
/**
|
||||
* Version information about used database
|
||||
*/
|
||||
function sql_server_info()
|
||||
{
|
||||
$version = @pg_version($this->db_connect_id);
|
||||
|
||||
return 'PostgresSQL' . ((!empty($version)) ? ' ' . $version['client'] : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* SQL Transaction
|
||||
* @access: private
|
||||
|
@@ -51,6 +51,14 @@ class dbal_sqlite extends dbal
|
||||
return ($this->db_connect_id) ? true : array('message' => $error);
|
||||
}
|
||||
|
||||
/**
|
||||
* Version information about used database
|
||||
*/
|
||||
function sql_server_info()
|
||||
{
|
||||
return 'SQLite ' . @sqlite_libversion();
|
||||
}
|
||||
|
||||
/**
|
||||
* SQL Transaction
|
||||
* @access: private
|
||||
|
Reference in New Issue
Block a user