mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Merge remote-tracking branch 'dhruvgoel92/ticket/11503' into develop
* dhruvgoel92/ticket/11503: [ticket/11503] similar implementation for mssql_native and odbc
This commit is contained in:
commit
4ac5028d24
2 changed files with 6 additions and 6 deletions
|
@ -253,7 +253,7 @@ class phpbb_db_driver_mssql_odbc extends phpbb_db_driver_mssql_base
|
||||||
* Fetch current row
|
* 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.
|
* @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;
|
global $cache;
|
||||||
|
|
||||||
|
|
|
@ -326,7 +326,7 @@ class phpbb_db_driver_mssqlnative extends phpbb_db_driver_mssql_base
|
||||||
$this->sql_report('stop', $query);
|
$this->sql_report('stop', $query);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cache_ttl)
|
if ($cache && $cache_ttl)
|
||||||
{
|
{
|
||||||
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
||||||
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
|
$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()
|
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;
|
$query_id = $this->query_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cache->sql_exists($query_id))
|
if ($cache && $cache->sql_exists($query_id))
|
||||||
{
|
{
|
||||||
return $cache->sql_fetchrow($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);
|
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 @sqlsrv_free_stmt($query_id);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue