[TYPO3-dev] How to do a performance-friendly search?

Jigal van Hemert jigal at xs4all.nl
Sun Oct 19 17:44:35 CEST 2008


Georg Ringer wrote:
> Enter a search word: ________
> 
> Specify your search:
> Dates
> [ ] Jan  [ ] Feb ....
> Difficulty
> [ ] easy [ ] normal [ ] difficult

For the months you can add a new column to search in.
To limit the number of conditions you can collect the checked fields for 
a certain column and use the IN () to search in the table.

E.g. WHERE `tx_rgtour_month` IN (1,3,4,5) AND `tx_rgtour_level` IN 
('easy','normal');

If a tour can be held in more than one month or if a tour has more than 
one difficulty it largely depend on whether you will use mm-tables or 
use a set-like field in the database.

-- 
Jigal van Hemert.


More information about the TYPO3-dev mailing list