Dynamic data search filters

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
kreoton
Forum Commoner
Posts: 42
Joined: Fri Mar 03, 2006 7:27 pm

Dynamic data search filters

Post by kreoton »

Hi, I have to complete one task of creating dynamic search filters in classified ads site and I need your help.
It is hard to explain what i want so here is example site: http://www.finn.no/finn/car/used/result in side bar you see dynamic search filters

Pris/Price
0 - 99.999 (12.547)
100.000 - 174.999 (12.025)
175.000 - 255.999 (12.093)
256.000 - 3.790.000 (12.077)

Årsmodell/Make date
1900-1999 (10293)
2000-2003 (11493)
2004-2005 (11425)
2006-8000 (15534)

Km.stand/Kilometrage
1-39999 (11306)
40000-79999 (12030)
80000-139999 (12896)
140000-999999 (12350)

How you see in all ranges counts are approximately same. Every time you click on one of filter other filters are recalculated.
Question is how this can be done in PHP/MySQL (we also have Sphinx installed) to complete this task using minimal number of database calls. Or maybe this can be done using sphinx?

Thanks for your help.
Post Reply