Complex URL filtering

dimoss

Well-Known Member
Hi,

i am using URL Filering methods described in the WiKI to get results based on complex queries.
For example I would like to get results for the following sql query:

WHERE ((player_a_id = 121404 and player_b_id = 121558) or (player_x_id = 121558 and player_y_id = 121404)) and tournament_id = 5518 and kind = 2

I have created the following URL Filtering:

index.php?option=com_fabrik&view=list&listid=31&Itemid=250&resetfilters=1&vw_matches___player_a_id[value]=121404&vw_matches___player_b_id[value]=121558&vw_matches___player_b_id[join]=AND&vw_matches___player_b_id[grouped_to_previous]=1&vw_matches___player_x_id[join]=OR&vw_matches___player_x_id[value]=121558&vw_matches___player_y_id[value]=121404&vw_matches___player_y_id[join]=AND&vw_matches___player_y_id[grouped_to_previous]=1&vw_matches___tournament_id_raw[value]=5518&vw_matches___kind[value]=2

Hoever this code produce the following query with fabrikdebug=1:

WHERE ((`vw_matches`.`player_a_id` = '121404' AND `vw_matches`.`player_b_id` = '121558') OR ( `vw_matches`.`player_x_id` = '121558' AND `vw_matches`.`player_y_id` = '121404' ) AND `vw_matches`.`tournament_id` = '5518' AND `vw_matches`.`kind` = '2' )

This is not exactly what I want because the grouping should be something like:

WHERE ((`vw_matches`.`player_a_id` = '121404' AND `vw_matches`.`player_b_id` = '121558') OR ( `vw_matches`.`player_x_id` = '121558' AND `vw_matches`.`player_y_id` = '121404' )) AND `vw_matches`.`tournament_id` = '5518' AND `vw_matches`.`kind` = '2'

OR

WHERE (((`vw_matches`.`player_a_id` = '121404' AND `vw_matches`.`player_b_id` = '121558') OR ( `vw_matches`.`player_x_id` = '121558' AND `vw_matches`.`player_y_id` = '121404' )) AND `vw_matches`.`tournament_id` = '5518' AND `vw_matches`.`kind` = '2')

Any help is appreciated.
Thanks,
 
Last edited:
Maybe one more "grouped_to_previous" somewhere? In the WIKI there are two of them
...&tablename___user_town[join]=OR
&tablename___user_town[grouped_to_previous][]=0
&tablename___user_town[grouped_to_previous][]=1...

(But I didn't try and I don't understand what it's doing exactly:) )
 
Thanks @troester
Trying also to figure it out reading the WiKi and some other older posts ;-)
If i get a solution i will post it here.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top