Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-9582 Missing MSSQL native driver case statements
  3. PHPBB-9562

Advanced Search is inaccessible using the mssqlnative DBAL

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Major Major
    • 3.0.8-RC1
    • 3.0.7-PL1
    • Search
    • None
    • PHP 5.3.1, MSSQL 2008 SP1, Windows 7, Chrome 5.0.342.9

      Clicking the "Advanced Search" link when using the mssqlnative driver (http://area51.phpbb.com/phpBB/viewtopic.php?p=206934#p206934) causes a general error to be thrown;

      General Error
      SQL ERROR [ mssqlnative ]
       
      SQLSTATE: 42000 code: 402 message: [Microsoft][SQL Server Native Client 10.0][SQL Server]The data types text and varchar are incompatible in the not equal to operator. [402]
       
      SQL
       
      SELECT TOP 5 search_time, search_keywords FROM phpbb_search_results WHERE search_keywords <> '' ORDER BY search_time DESC
       
      BACKTRACE
       
      FILE: includes/db/mssqlnative.php
      LINE: 313
      CALL: dbal->sql_error()
       
      FILE: includes/db/mssqlnative.php
      LINE: 370
      CALL: dbal_mssqlnative->sql_query()
       
      FILE: includes/db/dbal.php
      LINE: 170
      CALL: dbal_mssqlnative->_sql_query_limit()
       
      FILE: search.php
      LINE: 1171
      CALL: dbal->sql_query_limit()
      

      This error can be resolved by inserting the following code on line 1158 of search.php;

      case 'mssqlnative':

            ToonArmy Chris Smith
            robhouse robhouse [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: