Seite 1 von 1

MSSQL, PostgreSQL, etc. IGNORE error

Verfasst: 02.09.2003 17:07
von codemonkey
Es hat sich ein Fehler in phpBB 2.0.6 eingeschlichen, der Probleme bei Usern verursacht, die keine Mysql Datenbank verwenden.

Öffne includes/functions_search.php und finde:

Code: Alles auswählen

if ( $match_sql != '' ) 
      { 
         $sql = "INSERT IGNORE INTO " . SEARCH_MATCH_TABLE . " (post_id, word_id, title_match) 
            SELECT $post_id, word_id, $title_match  
               FROM " . SEARCH_WORD_TABLE . " 
               WHERE word_text IN ($match_sql)"; 
         if ( !$db->sql_query($sql) ) 
         { 
            message_die(GENERAL_ERROR, 'Could not insert new word matches', '', __LINE__, __FILE__, $sql); 
         } 
      }
und ersetzte mit:

Code: Alles auswählen

if ( $match_sql != '' ) 
      { 
         $sql = "INSERT INTO " . SEARCH_MATCH_TABLE . " (post_id, word_id, title_match) 
            SELECT $post_id, word_id, $title_match  
               FROM " . SEARCH_WORD_TABLE . " 
               WHERE word_text IN ($match_sql)"; 
         if ( !$db->sql_query($sql) ) 
         { 
            message_die(GENERAL_ERROR, 'Could not insert new word matches', '', __LINE__, __FILE__, $sql); 
         } 
      }
siehe auch den originalen Beitrag auf phpBB.com

Verfasst: 29.12.2003 22:43
von PhilippK
Der Bug sollte in allen aktuellen Download-Paketen beseitigt sein. Daher Beitrag freigegeben.

Gruß, Philipp