diff options
author | Dhruv <dhruv.goel92@gmail.com> | 2013-06-20 19:16:21 +0530 |
---|---|---|
committer | Dhruv <dhruv.goel92@gmail.com> | 2013-06-20 19:16:21 +0530 |
commit | 3eeeaababd915bb102de523aa4d4378231745f26 (patch) | |
tree | 6298bd4f42fbce8dce9c339c634f1c5f0b3a6175 /phpBB/includes/db | |
parent | d72b5aaf1bd6d959c2b06e923ab76fc1f370e455 (diff) | |
download | forums-3eeeaababd915bb102de523aa4d4378231745f26.tar forums-3eeeaababd915bb102de523aa4d4378231745f26.tar.gz forums-3eeeaababd915bb102de523aa4d4378231745f26.tar.bz2 forums-3eeeaababd915bb102de523aa4d4378231745f26.tar.xz forums-3eeeaababd915bb102de523aa4d4378231745f26.zip |
[ticket/11503] similar implementation for mssql_native and odbc
mssql_native and mssql_odbc db drivers varied at some places
where they should have been similar.
PHPBB3-11503
Diffstat (limited to 'phpBB/includes/db')
-rw-r--r-- | phpBB/includes/db/driver/mssql_odbc.php | 2 | ||||
-rw-r--r-- | phpBB/includes/db/driver/mssqlnative.php | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/phpBB/includes/db/driver/mssql_odbc.php b/phpBB/includes/db/driver/mssql_odbc.php index cde9d332ba..a1d1a5d5dd 100644 --- a/phpBB/includes/db/driver/mssql_odbc.php +++ b/phpBB/includes/db/driver/mssql_odbc.php @@ -253,7 +253,7 @@ class phpbb_db_driver_mssql_odbc extends phpbb_db_driver_mssql_base * Fetch current row * @note number of bytes returned depends on odbc.defaultlrl php.ini setting. If it is limited to 4K for example only 4K of data is returned max. */ - function sql_fetchrow($query_id = false, $debug = false) + function sql_fetchrow($query_id = false) { global $cache; diff --git a/phpBB/includes/db/driver/mssqlnative.php b/phpBB/includes/db/driver/mssqlnative.php index 6f433e10cf..28fc88298a 100644 --- a/phpBB/includes/db/driver/mssqlnative.php +++ b/phpBB/includes/db/driver/mssqlnative.php @@ -326,7 +326,7 @@ class phpbb_db_driver_mssqlnative extends phpbb_db_driver_mssql_base $this->sql_report('stop', $query); } - if ($cache_ttl) + if ($cache && $cache_ttl) { $this->open_queries[(int) $this->query_result] = $this->query_result; $this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl); @@ -394,7 +394,7 @@ class phpbb_db_driver_mssqlnative extends phpbb_db_driver_mssql_base */ function sql_affectedrows() { - return (!empty($this->query_result)) ? @sqlsrv_rows_affected($this->query_result) : false; + return ($this->db_connect_id) ? @sqlsrv_rows_affected($this->query_result) : false; } /** @@ -409,7 +409,7 @@ class phpbb_db_driver_mssqlnative extends phpbb_db_driver_mssql_base $query_id = $this->query_result; } - if ($cache->sql_exists($query_id)) + if ($cache && $cache->sql_exists($query_id)) { return $cache->sql_fetchrow($query_id); } @@ -474,9 +474,9 @@ class phpbb_db_driver_mssqlnative extends phpbb_db_driver_mssql_base return $cache->sql_freeresult($query_id); } - if (isset($this->open_queries[$query_id])) + if (isset($this->open_queries[(int) $query_id])) { - unset($this->open_queries[$query_id]); + unset($this->open_queries[(int) $query_id]); return @sqlsrv_free_stmt($query_id); } return false; |