I dont know how to convert this long model function to ignited datatable query. I have done small select functions with ignited datatables.Anybody know???
I have no idea
Use this in your controller and see if its working
public function fetch_data()
{
$this->load->library("datatables");
$query = $this->datatables
->select('jil_requirements.*,count(jil_mrorfq.rfq_requirementid) as total,count(jil_quotemjdetail.qud_requirementid) as quotemjtotal,count(jil_quotejcdetail.qud_requirementid) as quotejctotal,count( jil_pocjdetail.pocd_requirementid) as pocjtotal,count(jil_pojmdetail.pojd_requirementid) as pojmtotal')
->from('jil_requirements')
->join('jil_users', 'jil_requirements.rqm_userid=jil_users.usr_id', 'left')
->join('jil_merchants', 'jil_requirements.rqm_createdempid=jil_merchants.mer_id', 'left')
->join('jil_mrorfq', 'jil_mrorfq.rfq_requirementid = jil_requirements.rqm_id', 'left')
->join('jil_quotemjdetail', 'jil_quotemjdetail.qud_requirementid = jil_requirements.rqm_id', 'left')
->join('jil_pocjdetail', 'jil_pocjdetail.pocd_requirementid = jil_requirements.rqm_id', 'left')
->join('jil_pojmdetail', 'jil_pojmdetail.pojd_requirementid = jil_requirements.rqm_id', 'left')
->where('jil_requirements.rqm_permission!=', '4');
echo $this->datatables->generate();
}