add join in datatables using codeigniter
Sets join statement variables. If you want DataTables to include data from another table, you can define an a table along with its columns and foreign key relationship.
$this->datatables->join('states', 'cities.state_id = states.id', 'left');
$this->datatables->select('cities.id,cities.name,states.name as state_name')
->from('cities');
$this->datatables->join('states', 'cities.state_id = states.id', 'left');
$this->datatables->select('cities.id,cities.name,states.name as state_name')
->from('cities');
You have example in Codeigniter?
ReplyDelete