I am using CodeIgniter for an ad site. Here is a concrete example of what I'm trying to achieve:
The page http://www.example.com/browse/Real-Estatelists all real estate listings. I use the CI Pagination Class to break down the results.
The left pane shows a set of filters corresponding to each db column of the "Real Estate Ads" table. For instance:
Type: House, Apartment Bedrooms: 1,2,3,4 ... Furnished: Yes, No, etc.
Each time the user selects a value, a query is executed and the results are updated using Ajax.
However, since the choice of the value corresponds to the optional WHERE clause in the original query, I was wondering what would be the best way to filter the results already available without restarting the query.
source
share