![]() |
|
![]() |
#1 |
Green Mole
Join Date: Apr 2004
Posts: 1
|
Search results ordered by update_date
Hi,
Is it possible to classify the search results according the update date ? Best regards Peter |
![]() |
![]() |
![]() |
#2 |
Purple Mole
Join Date: Jan 2004
Posts: 694
|
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! |
![]() |
![]() |
![]() |
#3 |
Green Mole
Join Date: Dec 2003
Posts: 2
|
![]()
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 ![]() |
![]() |
![]() |
![]() |
#4 |
Green Mole
Join Date: Mar 2004
Posts: 22
|
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 |
![]() |
![]() |
![]() |
#5 |
Green Mole
Join Date: Dec 2003
Posts: 2
|
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 |
![]() |
![]() |
![]() |
#6 |
Green Mole
Join Date: Sep 2004
Posts: 1
|
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 |
![]() |
![]() |
![]() |
#7 |
Green Mole
Join Date: Mar 2004
Posts: 22
|
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 |
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Restricting search results by URL at the search form level | innerfire | How-to Forum | 3 | 08-01-2005 08:36 AM |
Pulling search results into existing search system. | satcom | How-to Forum | 2 | 05-03-2005 10:58 AM |
No most searched terms, biggest results, most 0 results, last search queries, etc. | jongag1 | How-to Forum | 6 | 04-22-2005 10:43 AM |
Search on search results page not working | bforsyth | Troubleshooting | 10 | 08-20-2004 09:35 PM |
¿Modify the label <phpdig:update_date/>? | zertiko | How-to Forum | 2 | 07-25-2004 07:38 AM |