I have a complex query that uses subselects and joins.
The problem is that grid4php do not want to insert filtering condition in a proper location.
My syntax is:
Select ….. from …
left join (select … from where….. group by …)
left join …..
where….
group by…
The filter whold be inserted after the last where prior to “group by” but it inserted into subselect (prior to subselect’s “group by” accordingly)
Did i miss something to configure?
I tried the same case and it’s adding a filter on the outer query with latest version (free as well).
select orders.* from orders LEFT JOIN (select employee_id from employees group by country) AS e ON e.employee_id = orders.employee_id
WHERE 1=1 AND ( `ship_via` LIKE ‘%2%’ ) group by ship_via ORDER BY 1 ASC LIMIT 20 OFFSET 0
You can email me sample db and grid code for exact case.