Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-11503

Implementation of DB drivers vary too much

XMLWordPrintable

      As from my understand the two drivers mssql_odbc.php and mssqlnative.php handle somethings different which should be equal. In most cases the code fomr the odbc driver is the better one:

      mssql_odbc.php

      function sql_query($query = '', $cache_ttl = 0)
      ...
      if ($cache && $cache_ttl)


      mssqlnative.php

      function sql_query($query = '', $cache_ttl = 0)
      ...
      if ($cache_ttl)

      =====

      mssql_odbc.php

      	function sql_affectedrows()
      	{
      		return ($this->db_connect_id) ? @odbc_num_rows($this->query_result) : false;
      	}


      mssqlnative.php

      	function sql_affectedrows()
      	{
      		return (!empty($this->query_result)) ? @sqlsrv_rows_affected($this->query_result) : false;
      	}

      =====

      mssql_odbc.php ODBC INCORRECT HERE

      function sql_fetchrow($query_id = false, $debug = false)


      mssqlnative.php

      function sql_fetchrow($query_id = false)

      =====

      mssql_odbc.php

      		if ($cache && $cache->sql_exists($query_id))
      		{
      			return $cache->sql_fetchrow($query_id);
      		}


      mssqlnative.php

      		if ($cache->sql_exists($query_id))
      		{
      			return $cache->sql_fetchrow($query_id);
      		}

      =====

      mssql_odbc.php

      		if ($cache && $cache->sql_exists($query_id))
      		{
      			return $cache->sql_freeresult($query_id);
      		}
       
      		if (isset($this->open_queries[(int) $query_id]))
      		{
      			unset($this->open_queries[(int) $query_id]);


      mssqlnative.php

      		if ($cache->sql_exists($query_id))
      		{
      			return $cache->sql_freeresult($query_id);
      		}
       
      		if (isset($this->open_queries[$query_id]))
      		{
      			unset($this->open_queries[$query_id]);

            dhruv.goel92 Dhruv Goel [X] (Inactive)
            nickvergessen Joas Schilling
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: