Multiple Database Search Fix for v0.9.6.

Support issues for DGS Search

Moderator: DGS Search Developer

Multiple Database Search Fix for v0.9.6.

Postby sella » Sat May 15, 2004 10:03 pm

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).

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);
         case 'pgsql':
            $query = searchPgSQL($db, $q, $r, 0, 0, $matchCount);
//          $query = searchPgSQL($db, $q, $r, $o, $s, $matchCount);
         case 'mssql':
            $query = searchMSSQL($db, $q, $r, 0, 0, $matchCount);
//          $query = searchMSSQL($db, $q, $r, $o, $s, $matchCount);
         case 'odbc':
            $query = searchODBC($db, $q, $r, 0, 0, $matchCount);
//          $query = searchODBC($db, $q, $r, $o, $s, $matchCount);
         case 'ibase':
            $query = searchIBase($db, $q, $r, 0, 0, $matchCount);
//          $query = searchIBase($db, $q, $r, $o, $s, $matchCount);

            printf("Error: %s is not a supported database type.<BR>\n", $db['type']);
            return $retVal;
User avatar
Site Admin
Posts: 81
Joined: Sat Jan 17, 2004 6:53 pm
Location: Denver, CO


Postby MattH » Fri Oct 01, 2004 4:33 pm

I used DGSSearch in my old job successfully and couldn't figure out why it was failing with more than one db.... Now I know Thanks again for such a great project!

Return to DGS Search

Who is online

Users browsing this forum: No registered users and 2 guests