Methods for building dynamic filter searching
I am investigating methods for building dynamic filter searching such as Zappos, Amazon (I guess they call these faceted searches) with php/mysql.
1. I have a list of search parameters (checkbox’s, radio’s, etc), that belong to filterForm. A search query would be built by adding or subtracting parameters as they are selected and query the server upon each selection.
2. I also need to get the count of hit/matches for each parameter in the filterForm, regardless if they are selected or not.
So essentially, I need to query for matches and return a dataSet AND simultaneously get each parameter count for the active dataSet.
1. Request two separate queries in succession, I believe this is wasteful and prone to inaccurate counts?
2. Use a Stored Procedure (capable of returning two dataSets from same Select)?
3. Request match dataset and create session variable containing array of parameter/counts?
4. Use php to split the dataset into two?
These are just ideas; I am not sure what is at all possible here…
Looking for direction, suggestions and how this may be tied into DataAssist; if at all?