![]() |
Search results ordered by update_date
Hi,
Is it possible to classify the search results according the update date ? Best regards Peter |
First of all, welcome to the phpDig forum, Peter. We're glad to have you here.
This is untested, but please find the following code in search_function.php: PHP Code:
PHP Code:
Let us know if this worked, too. Thanks! |
I seem to have a problem.
I am trying to have the results appear in date order (latest update first). I tried your ORDER BY idea but unfortunatly, it does not change anything. I am truly stuck. Is there another way? Thanks in advance:confused: |
This don't work because ordering is done on the php code and not on the database.
Try the following : Install the mod I've submitted : Optimized Search In queryparser.php around line 100 change PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
Note I didn't tested it but it should work |
Thanks synnalagma,
Followed your way and I have a better result. I do not have a chronological sort yet but I believe the weight plays a bit. Still trying and will keep you posted. By the way, your Optimised search is truly optimised. Thanks again, Nimbus |
Search results ordered by update_date
Hello
I have this error do u have a idea ? SELECT SQL_BIG_RESULT engine.spider_id, SUM((CASE WHEN engine.key_id IN (1320) THEN engine.weight *1.0 WHEN engine.key_id IN (14001,170283,49543,334503,30322,337511,298133,32081,161324,164303,10818,35 0144,341169,286488,44820,400835,64352,76436) THEN engine.weight *0.8 END)) AS w FROM engine WHERE engine.key_id IN (1320,14001,170283,49543,334503,30322,337511,298133,32081,161324,164303,108 18,350144,341169,286488,44820,400835,64352,76436) GROUP BY engine.spider_id HAVING w>0 ORDER BY spider.last_modified, w DESC Table inconnue 'spider' dans order clause Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in c:\phpdig\libs\other_search_function.php on line 163 Thks |
Verify that PHPDIG_DB_PREFIX is defined in config.php if not set it to the correct value (usually 'phpdig_').
If it's set try including config.php in class.queryparser.php by adding on top include(PATH_TO_PHP_DIG/config.php); (check to have correct values). Should work |
All times are GMT -8. The time now is 12:24 AM. |
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.