Multiple Database Search Fix for v0.9.6.

If you are trying to search more than 1 database with your install of DGS Search, you will need to preform this fix to make it function properly. We'll eventually put out a new version with a fix in it... but until then...
Within the file libs/search/db.php in the function function db($retVal, $sq, $timer) at the top of the file, you need to modify the calls to searchMySQL or whatever database you are using.
The original line is shown as commented out here and the new line right above it. Basically, you are just replacing the $o and $s with a 0 (zero).
Within the file libs/search/db.php in the function function db($retVal, $sq, $timer) at the top of the file, you need to modify the calls to searchMySQL or whatever database you are using.
The original line is shown as commented out here and the new line right above it. Basically, you are just replacing the $o and $s with a 0 (zero).
- Code: Select all
//The disabled lines below basically disable the LIMIT/TOP support, since its damaged with more than 1 database entry.
switch ($db['type']) {
case 'mysql':
$query = searchMySQL($db, $q, $r, 0, 0, $matchCount);
// $query = searchMySQL($db, $q, $r, $o, $s, $matchCount);
break;
case 'pgsql':
$query = searchPgSQL($db, $q, $r, 0, 0, $matchCount);
// $query = searchPgSQL($db, $q, $r, $o, $s, $matchCount);
break;
case 'mssql':
$query = searchMSSQL($db, $q, $r, 0, 0, $matchCount);
// $query = searchMSSQL($db, $q, $r, $o, $s, $matchCount);
break;
case 'odbc':
$query = searchODBC($db, $q, $r, 0, 0, $matchCount);
// $query = searchODBC($db, $q, $r, $o, $s, $matchCount);
break;
case 'ibase':
$query = searchIBase($db, $q, $r, 0, 0, $matchCount);
// $query = searchIBase($db, $q, $r, $o, $s, $matchCount);
break;
default:
printf("Error: %s is not a supported database type.<BR>\n", $db['type']);
return $retVal;
}