Ajax Data table Codeigniter query return only one row
you are echoing only the first element of the result,so put your result in a variable and loop through it
$results = $this->datatables->generate();foreach ($results as $row){ print_r($row);}
I hope that helps