[TYPO3] wfqbe (DB integration) and multiple select options

Pascal Cramer pascal at [nospam]roguesheep.nl
Wed Sep 26 16:16:16 CEST 2007


Hi b,

I am very new to wfqbe and cannot help you with this (sorry) but I think Mauro, 
the author, is quite willing to help out. If no answer pops op here, try to 
email him, his address is in the manual and of course share his anser here :-)

Pascal

bhoft wrote:
> Hi, 
> I am trying to create a search option with multiple static values, which
> should be searchable in a mysql table with the column type 'set' the values
> could be e.g. ('type 1', 'type2' ... ' type10' ..).
> 
> The searchform should have a checkbox group so multiple set values should be
> listed in the result.
> So my problem is how do I create the select Query table object to get the
> right sql query?
> I tried the options 'in' 'like' and so on.
> 
> the 'like' search option would work, but in case of same texts the like
> '%type 1%' would also find the entries with 'type 10' set in the database
> and this also if I only search for 'type 1' and not multiple values like
> ('type 1', 'type x' ) in case I select multiple checkbox as searchoptions on
> my searchform.
> 
> A good select query would be:
> SELECT *
> FROM `tablename`
> WHERE FIND_IN_SET( 'type 1', set_column ) >0
> OR FIND_IN_SET( 'type 10', set_column ) >0
> LIMIT 0 , 30;		
> 
> I also tried to extend the form generator class, but because the query is
> only filled up with the values on the placeholders. So this isn't what I
> want.
> 
> Is there another way to extend or modify the select for a specific
> searchoption?
> I read about hooks, but for me its not clear how and where this hooks are
> created.
> 
> thx in advance for any help or suggestion
> 


More information about the TYPO3-english mailing list