[TYPO3-project-formidable] Searchform not filtering data
Gary Wong
gary.wong at spingroup.com
Wed Jul 29 21:15:44 CEST 2009
Pablo, search for the thread "Bug in rev 345 when using 'remote'" - it's
the same issue I believe. You'll have to revert to a pre-2.0.345
version, or apply the ugly patch from that thread.
Good luck!
Gary
Pablo Santamaría wrote:
> Hi!
>
> I'm using Typo3 4.28 and Ameos Formidable 2.0.367.
>
> I'm retrieving data from DB with a datasource:DB, then filtering it
> using a searchform and finally, showing it with a lister.
>
> My problem is apparently the following: searchform doesn't not filter
> data retrieved, and the lister always show all possible rows. It seems
> that searchform's WHERE clause is not added to the original query from
> datasource:DB.
>
> After performing some tests, I've found the following: When I insert
> inside the searchform a child with a name which not corresponds to any
> field on the database, only is showed a Mayday error when the original
> SQL query returns an empty result. When the original query returns data,
> searchform is ignored.
>
> Any idea would greatly appreciated. Thanks in advance
>
> Cheers,
> Pablo.
>
> Here I'm writing down the searchform and the query:
>
> SEARCHFORM:
> -----------
>
> <renderlet:SEARCHFORM name="srchf_pi4_select_competition" label="xxx">
> <datasource use="dtsrc_pi4_select_competition" />
> <childs>
> <renderlet:TEXT name="foo" label="xxx" >
> </renderlet:TEXT>
>
> <renderlet:SUBMIT name="search_button" label="xxx"
> mode="search" />
> </childs>
> </renderlet:SEARCHFORM>
>
> QUERY
> -----
> return 'SELECT '
> . TX_SPORTSCOMPETMGMT_TABLE_COMPETITION.'.uid AS uid, '
> . TX_SPORTSCOMPETMGMT_TABLE_COMPETITION.'.name AS name, '
> . TX_SPORTSCOMPETMGMT_TABLE_SPORT.'.name AS competition_sport'
> .' FROM '
> . TX_SPORTSCOMPETMGMT_TABLE_COMPETITION.','
> . TX_SPORTSCOMPETMGMT_TABLE_SPORT
> .' WHERE '
> . TX_SPORTSCOMPETMGMT_TABLE_COMPETITION.'.sport =
> '.TX_SPORTSCOMPETMGMT_TABLE_SPORT.'.uid'
> .' AND '.TX_SPORTSCOMPETMGMT_TABLE_COMPETITION.'.pid="108"';
>
> To make this query return an empty set, just change "pid=108" by pid !=108
> _______________________________________________
> TYPO3-project-formidable mailing list
> TYPO3-project-formidable at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable
>
More information about the TYPO3-project-formidable
mailing list