diff options
Diffstat (limited to 'phpBB/includes/db')
-rw-r--r-- | phpBB/includes/db/firebird.php | 10 | ||||
-rw-r--r-- | phpBB/includes/db/mysql.php | 2 | ||||
-rw-r--r-- | phpBB/includes/db/postgres.php | 6 |
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) |