diff --git a/e107_handlers/search_class.php b/e107_handlers/search_class.php index 2437a0ec0..7c3c1059a 100644 --- a/e107_handlers/search_class.php +++ b/e107_handlers/search_class.php @@ -9,9 +9,9 @@ * * * $Source: /cvs_backup/e107_0.8/e107_handlers/search_class.php,v $ - * $Revision: 1.4 $ - * $Date: 2009-11-18 01:04:43 $ - * $Author: e107coders $ + * $Revision: 1.5 $ + * $Date: 2010-01-03 22:01:59 $ + * $Author: e107steved $ */ if (!defined('e107_INIT')) { exit; } @@ -259,10 +259,9 @@ class e_search { } else { $ps['text'] = $no_results; } - if ($search_prefs['mysql_sort']) { - $sql -> db_Query("SELECT FOUND_ROWS()"); - $frows = $sql -> db_Fetch(); - $ps['results'] = $frows[0]; + if ($search_prefs['mysql_sort']) + { + $ps['results'] = $sql->total_results; // db class reads result of SELECT FOUND_ROWS() for us } return $ps; }