diff options
| author | Lester Caine <lester@lsces.co.uk> | 2006-09-06 08:33:23 +0000 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2006-09-06 08:33:23 +0000 |
| commit | 66218f411b90848444d3a5b483e93c86c880ccd1 (patch) | |
| tree | b2dbef8eebffaf3fecd4256e0a5c82e0ab99559c | |
| parent | ea78fddb5b46848d8ccba8559f99ef2f674e338a (diff) | |
| download | search-66218f411b90848444d3a5b483e93c86c880ccd1.tar.gz search-66218f411b90848444d3a5b483e93c86c880ccd1.tar.bz2 search-66218f411b90848444d3a5b483e93c86c880ccd1.zip | |
Fix queries for Firebird
Aliases can not be used in ORDER BY - use column number
No need to have content_id twice in GROUP BY
| -rw-r--r-- | search_lib.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/search_lib.php b/search_lib.php index 8b679c8..d51dae9 100644 --- a/search_lib.php +++ b/search_lib.php @@ -1,6 +1,6 @@ <?php /** - * $Header: /cvsroot/bitweaver/_bit_search/search_lib.php,v 1.25 2006/08/30 14:26:11 hash9 Exp $ + * $Header: /cvsroot/bitweaver/_bit_search/search_lib.php,v 1.26 2006/09/06 08:33:23 lsces Exp $ * * Copyright (c) 2004 bitweaver.org * Copyright (c) 2003 tikwiki.org @@ -8,7 +8,7 @@ * All Rights Reserved. See copyright.txt for details and a complete list of authors. * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details * - * $Id: search_lib.php,v 1.25 2006/08/30 14:26:11 hash9 Exp $ + * $Id: search_lib.php,v 1.26 2006/09/06 08:33:23 lsces Exp $ * @author Luis Argerich (lrargerich@yahoo.com) * @package search */ @@ -201,11 +201,10 @@ class SearchLib extends BitBase { WHERE si.`content_id`=lc.`content_id` GROUP BY si.`content_id`, - lc.`content_id`, si.`searchword` HAVING si.`searchword` IN (" . $qPlaceHolders1 . ") )>0 $whereSql - ORDER BY relivency DESC, hits DESC + ORDER BY 9 DESC, 5 DESC "; $querycant = "SELECT COUNT(*) @@ -218,7 +217,6 @@ class SearchLib extends BitBase { WHERE si.`content_id`=lc.`content_id` GROUP BY si.`content_id`, - lc.`content_id`, si.`searchword` HAVING si.`searchword` IN (" . $qPlaceHolders1 . ") )>0 $whereSql"; |
