Hello
As you know, if you want to make a simple filter in the list, we just add a 'where' clause like this:
$crud->where('Email', $this->session->userdata('username'));
but my need for filtering is more complex because actually what I have in my table is an FK to another table, so I have to make a join of the FK of table B with the ID of table A where in that table A, the email is equal to this username I have given you in the form of a variable like written above
Of course, I know how to do that in normal scenarios but in a crud I don't know how that is possible because:
some pseudocode here:
$crud = new grocery_CRUD(); $crud->set_subject('Assets'); $crud->set_table('asset'); $crud->where B.FK = A.ID and A.email = $this->session->userdata('username'));
how do I properly write those joins and so in crud syntax?
Note that I am wanting to do it so that it shows me filtered results only. I am not talking about set_relation etc as that would display me Select lists, that is another story.
regards