Hi,
Could you please advise if is there any possibility in set_relation method specify OR operator joining two tables
Currently i have:
$crud->set_table('lm_users'); $crud->set_relation('ko_id','lm_ko','ko_name',array('ko_deleted' => 0,'ko_dr_id' =>$this->session->userdata('dr_id')),'id');
it generates sql like this:
select * from lm_users join lm_ko on ko_id=id where ko_deleted=0 and ko_dr_id={$this->session->userdata('dr_id'))}
I need where clause like this:
select * from lm_users join lm_ko on ko_id=id where (ko_deleted=0 and ko_dr_id={$this->session->userdata('dr_id'))}) OR ko_id=-1
How could i solve such problem?
Thank you!