How to use an 'AND' in a Join for DataTables PHP
How to use an 'AND' in a Join for DataTables PHP
I have a simple join that looks like this, joins from the employee table to the clienttests table using 'pk' and 'clientID'.
->leftJoin( 'clienttests as cTest', 'cTest.clientID', '=', 'employee.pk' )
I would like to be able to add an additional condition, an 'AND' that happens to be statically defined in this case.
SO for example it would be like this:
left join clienttests cTest on cTest.clientID = employee.pk AND cTest.testType='123'
Basically I am trying to limit the specific records I am getting back from clienttests to records that have testType '123'.
Thanks
Answers
Hi,
At the moment the current workaround is to use the method described in this thread. The next major version of Editor (which will be available next month) will formalise this API.
Regards,
Allan