- query id can be zero [Bug #4584]

git-svn-id: file:///svn/phpbb/trunk@6438 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Nils Adermann 2006-10-03 20:38:03 +00:00
parent aca3b8c5cf
commit f7f6e9bcde
8 changed files with 8 additions and 8 deletions

View file

@ -107,7 +107,7 @@ class dbal_firebird extends dbal
$this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false; $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result); $this->sql_add_num_queries($this->query_result);
if (!$this->query_result) if ($this->query_result === false)
{ {
if (($this->query_result = @ibase_query($this->db_connect_id, $query)) === false) if (($this->query_result = @ibase_query($this->db_connect_id, $query)) === false)
{ {

View file

@ -128,7 +128,7 @@ class dbal_mssql extends dbal
$this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false; $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result); $this->sql_add_num_queries($this->query_result);
if (!$this->query_result) if ($this->query_result === false)
{ {
if (($this->query_result = @mssql_query($query, $this->db_connect_id)) === false) if (($this->query_result = @mssql_query($query, $this->db_connect_id)) === false)
{ {

View file

@ -127,7 +127,7 @@ class dbal_mssql_odbc extends dbal
$this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false; $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result); $this->sql_add_num_queries($this->query_result);
if (!$this->query_result) if ($this->query_result === false)
{ {
if (($this->query_result = @odbc_exec($this->db_connect_id, $query)) === false) if (($this->query_result = @odbc_exec($this->db_connect_id, $query)) === false)
{ {

View file

@ -132,7 +132,7 @@ class dbal_mysql extends dbal
$this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false; $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result); $this->sql_add_num_queries($this->query_result);
if (!$this->query_result) if ($this->query_result === false)
{ {
if (($this->query_result = @mysql_query($query, $this->db_connect_id)) === false) if (($this->query_result = @mysql_query($query, $this->db_connect_id)) === false)
{ {

View file

@ -118,7 +118,7 @@ class dbal_mysqli extends dbal
$this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false; $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result); $this->sql_add_num_queries($this->query_result);
if (!$this->query_result) if ($this->query_result === false)
{ {
if (($this->query_result = @mysqli_query($this->db_connect_id, $query)) === false) if (($this->query_result = @mysqli_query($this->db_connect_id, $query)) === false)
{ {

View file

@ -104,7 +104,7 @@ class dbal_oracle extends dbal
$this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false; $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result); $this->sql_add_num_queries($this->query_result);
if (!$this->query_result) if ($this->query_result === false)
{ {
$in_transaction = false; $in_transaction = false;
if (!$this->transaction) if (!$this->transaction)

View file

@ -152,7 +152,7 @@ class dbal_postgres extends dbal
$this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false; $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result); $this->sql_add_num_queries($this->query_result);
if (!$this->query_result) if ($this->query_result === false)
{ {
if (($this->query_result = @pg_query($this->db_connect_id, $query)) === false) if (($this->query_result = @pg_query($this->db_connect_id, $query)) === false)
{ {

View file

@ -109,7 +109,7 @@ class dbal_sqlite extends dbal
$this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false; $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result); $this->sql_add_num_queries($this->query_result);
if (!$this->query_result) if ($this->query_result === false)
{ {
if (($this->query_result = @sqlite_query($query, $this->db_connect_id)) === false) if (($this->query_result = @sqlite_query($query, $this->db_connect_id)) === false)
{ {