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'); 

Comments

Post a Comment

Popular posts from this blog

Stop video playing when Bootstrap modal is closed