Hi,
I have a very big form (more than a hudred fields).
I order to organize the form (Tabs) I have built 1-1 groups (about 20).
Fabrik, when querying to get the Ids produces a huge amount of lines (more than 1 000 000) just to get the 8 Ids corresponding to the WHERE clause.
Instead of simply build this query
it builds this huge query (here shorten by ellipsis)
How can I bring Fabrik to generate a slimmer query?
I have a very big form (more than a hudred fields).
I order to organize the form (Tabs) I have built 1-1 groups (about 20).
Fabrik, when querying to get the Ids produces a huge amount of lines (more than 1 000 000) just to get the 8 Ids corresponding to the WHERE clause.
Instead of simply build this query
Code:
SELECT DISTINCT `fab__books`.`id` AS __pk_val0
FROM `fab__books`
WHERE ( fab__books.id_stage = '4' )
ORDER BY `fab__books`.`id` DESC
Code:
SELECT DISTINCT `fab__books`.`id` AS __pk_val0,
`fab__stages`.`id` AS __pk_val1,
`fab__historybooks`.`id` AS __pk_val7,
`fab__historyusers`.`id` AS __pk_val8,
`fab__books_10_repeat`.`id` AS __pk_val2,
`fab__books_11_repeat`.`id` AS __pk_val3,
...
`fab__books_88_repeat`.`id` AS __pk_val26,
`fab__books_89_repeat`.`id` AS __pk_val27,
FROM `fab__books`
LEFT JOIN `fab__dates_rm` AS `fab__dates_rm` ON `fab__dates_rm`.`date_meeting` = `fab__books_88_repeat`.`date_available`
LEFT JOIN `fab__stages` AS `fab__stages_0` ON `fab__stages_0`.`id` = `fab__books`.`id_stage`
LEFT JOIN `fab__stages` AS `fab__stages` ON `fab__stages`.`id` = `fab__books`.`id_stage`
LEFT JOIN `fab__historybooks` AS `fab__historybooks` ON `fab__historybooks`.`projet_id` = `fab__books`.`id`
LEFT JOIN `fab__historyusers` AS `fab__historyusers` ON `fab__historyusers`.`projet_id` = `fab__books`.`id`
LEFT JOIN `fab__books_10_repeat` AS `fab__books_10_repeat` ON `fab__books_10_repeat`.`parent_id` = `fab__books`.`id`
LEFT JOIN `fab__books_11_repeat` AS `fab__books_11_repeat` ON `fab__books_11_repeat`.`parent_id` = `fab__books`.`id`
...
LEFT JOIN `n05pm_users` AS `n05pm_users_8` ON `n05pm_users_8`.`id` = `fab__books_89_repeat`.`de`
LEFT JOIN `n05pm_users` AS `n05pm_users` ON `n05pm_users`.`id` = `fab__books`.`id_written`
WHERE ( fab__books.id_stage = '4' )
ORDER BY `fab__books`.`id` DESC,`fab__books`.`id` DESC