Reputation: 1051
I need to build a filter search that returns data using the criteria set. My problem is building the search. It needs to be a OR query because anyone of them could be selected.
http://img200.imageshack.us/img200/2527/screenshot20100118at095.png
This is what will be searched.
Accommodation.space Accommodation.room_type Accommodation.facilities Accommodation.speaks
The only way I can think of doing it is an if statement for each input, but that would be 15 if statements, is there a better way?
Upvotes: 2
Views: 3136
Reputation: 2385
Here is a new tutorial about this. Might help: http://www.youtube.com/watch?v=FAVuLXFVaCw
Upvotes: 0
Reputation: 4012
This is a nice component which could likely be tweaked to work for you. It might even work right "out of the box"
http://www.jamesfairhurst.co.uk/posts/view/cakephp_filter_component/
Upvotes: 0