aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2003-08-27 16:31:54 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2003-08-27 16:31:54 +0000
commit6225256418c127806f2c3d8a0ca0fe448b74c1c4 (patch)
treef6234c61eb8c304df981e875219b13f59dc59f24 /phpBB/includes/db
parent2c9b17ba48923df1d66d1b571dc92fa0db505374 (diff)
downloadforums-6225256418c127806f2c3d8a0ca0fe448b74c1c4.tar
forums-6225256418c127806f2c3d8a0ca0fe448b74c1c4.tar.gz
forums-6225256418c127806f2c3d8a0ca0fe448b74c1c4.tar.bz2
forums-6225256418c127806f2c3d8a0ca0fe448b74c1c4.tar.xz
forums-6225256418c127806f2c3d8a0ca0fe448b74c1c4.zip
bah, group handling needs some further discussion ... I'm done with it for M-2
git-svn-id: file:///svn/phpbb/trunk@4440 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/db')
-rw-r--r--phpBB/includes/db/firebird.php10
-rw-r--r--phpBB/includes/db/mysql.php2
-rw-r--r--phpBB/includes/db/postgres.php6
3 files changed, 10 insertions, 8 deletions
diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/firebird.php
index 247f3dd429..65be3b7723 100644
--- a/phpBB/includes/db/firebird.php
+++ b/phpBB/includes/db/firebird.php
@@ -43,7 +43,7 @@ class sql_db
$this->password = $sqlpassword;
$this->server = $sqlserver;
- $this->db_connect_id =($this->persistency) ? @ibase_pconnect($this->server, $this->user, $this->password) : @ibase_connect($this->server, $this->user, $this->password);
+ $this->db_connect_id =($this->persistency) ? @ibase_pconnect($this->server, $this->user, $this->password, false, false, 3) : @ibase_connect($this->server, $this->user, $this->password, false, false, 3);
return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error('');
}
@@ -132,6 +132,12 @@ class sql_db
$this->sql_error($query);
}
+ if (!$this->transaction && (strpos($query, 'INSERT') === 0 || strpos($query, 'UPDATE') === 0))
+ {
+ echo $query;
+ ibase_commit();
+ }
+
if (!empty($_GET['explain']))
{
$endtime = explode(' ', microtime());
@@ -415,7 +421,7 @@ class sql_db
function sql_escape($msg)
{
- return (@ini_get('magic_quotes_sybase') || strtoupper(@ini_get('magic_quotes_sybase')) == 'ON') ? str_replace('\\\'', '\'', addslashes($msg)) : str_replace('\\\'', '\'\'', $msg);
+ return (@ini_get('magic_quotes_sybase') || strtolower(@ini_get('magic_quotes_sybase')) == 'on') ? str_replace('\\\'', '\'', addslashes($msg)) : str_replace('\'', '\'\'', stripslashes($msg));
}
function sql_error($sql = '')
diff --git a/phpBB/includes/db/mysql.php b/phpBB/includes/db/mysql.php
index cd9a074f35..040f057f4e 100644
--- a/phpBB/includes/db/mysql.php
+++ b/phpBB/includes/db/mysql.php
@@ -134,7 +134,7 @@ class sql_db
$curtime = $curtime[0] + $curtime[1] - $starttime;
}
- if (!($this->query_result = @mysql_query($query, $this->db_connect_id)))
+ if (($this->query_result = @mysql_query($query, $this->db_connect_id)) === false)
{
$this->sql_error($query);
}
diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php
index 8f916eae99..aa26e8ec8f 100644
--- a/phpBB/includes/db/postgres.php
+++ b/phpBB/includes/db/postgres.php
@@ -35,12 +35,9 @@ class sql_db
var $rownum = array();
var $num_queries = 0;
- //
- // Constructor
- //
function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true)
{
- $this->connect_string = "";
+ $this->connect_string = '';
if ($sqluser)
{
@@ -363,7 +360,6 @@ class sql_db
function sql_error($sql = '')
{
-
if (!$this->return_on_error)
{
if ($this->transaction)