I have a code that draws a table according to the data in the database. EX: if she has a registered client she will make the table with only one row, if it has no one registered, no table will appear. In that code too, I have a filter (tabletools) that when you type anything it checks whether it exists in the table. In my model, I need to put a WHERE to show users only the company that is logged in, but when I put this in, the filter stops working. The line that is giving error is this:
$this->datatables->where('em.e_id = ' . $this->session->userdata('e_id') . ' AND usr.u_ni = 3 OR em.e_fil = ' . $this->session->userdata('e_id') . ' AND usr.u_ni = 3 ');