Jump to content


Member Since 04 Jul 2014
Offline Last Active Jul 29 2020 03:47 AM

Topics I've Started

setRelation Where Condition (Input Statement) doesn't work at v.2.7.9

12 September 2019 - 06:08 AM

Dear @web-johnny,


Hi there! I observed that the setRelation Where Condition (Input Statement) doesn't work anymore at v.2.7.9.
My code goes something like this:
$crud->setRelation('el_CourseId', 'set_course', '{course_Title} - [{course_RefNo}]', ["set_course.course_Id = '1522' OR set_course.course_Id = '1519'"]);

The old versions support this type of where condition. I need this feature because I need  an "OR" operator on one field that I am selecting data from.


The error displayed was:



I also tried putting parenthesis in my code so it becomes like this:

$crud->setRelation('el_CourseId', 'set_course', '{course_Title} - [{course_RefNo}]', ["(set_course.course_Id = '1522' OR set_course.course_Id = '1519')"]);

but the same error occurs. This is a major issue for the system that I am currently working now.

Is this a bug? If it is, then I hope it will be fixed soon. If there's a workaround, kindly teach me on how to do it.


Thank you very much and more power!