Chase

Anonymous
i get the following error

An SQL error has occurred. Please see error.log for details.

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Fixed, thanks. It was actually a bug in the search of the forum plugin.

bye, Dirk

Chase

Anonymous
how do i fix it on my site?

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
In the forum plugin's functions.inc file, find the function plugin_dopluginsearch_forum(). Change this:
Text Formatted Code
    if ( $keyType == 'phrase' ) {
         $query = addslashes($query); // <-- new
        $sqltmp .= "AND (comment LIKE '%$query%' OR subject LIKE '%$query%')";
    } else  if ( $keyType == 'any' ) {

and a bit further down:
Text Formatted Code
    } else {
        $query = addslashes($query); // <-- new
        $sqltmp = "WHERE (comment LIKE '%$query%' OR subject LIKE '%$query%')";
    }

bye, Dirk