I have a query like this:
select * from master_tbl
left join child_tbl on child_tbl.parent=master_tbl.id and child_tbl.username='john'
where master_tbl.data=1
simply I want to replace the ON condition _childtbl.username='john' by the logged in user's user name _child_tbl.username=$SESSION['UserID'] (syntax omitted here)
I tried doing it by preg_replace at List Page: Before SQL Query, then the page will generate php error telling SQL syntax error while querying something like
SELECT count(*) from child_tbl) as t1 on ...
(yes there is an unpaired bracket)
In the error page detail, the call stack show that error occurs when PHPR tries to call GetRowCount.
Any substitute method to this?