I found a solution for my issue, I just made a view in the DataBase with all columns required in my application and it’s all.
Now I have another issue, I’m working with a Oracle Database, and I want to compare a range of dates for example:
$this->datatables->select("ID_E, NAME, SNAME, BIRTHDATE")
->add_column('OPTIONS', '$1','get_buttons(ID_E)')
->from('EMPLOYEES')->where('BIRTHDATE between "01/01/1985" and "31/12/1998"');
echo $this->datatables->generate();it produces an error:
Fatal error</b>: Call to a member function num_rows() on a non-object in ...
How can I introduce proper functions of Oracle in “where” condition? for example to_date()
I want to make something like the following:
$this->datatables->select("ID_E, NAME, SNAME, BIRTHDATE")
->add_column('OPTIONS', '$1','get_buttons(ID_E)')
->from('EMPLOYEES')->where('BIRTHDATE between to_date("01/01/1985","dd/mm/yyyy") and to_date("31/12/1998","dd/mm/yyyy")');
echo $this->datatables->generate();