my controller function
public function add_books() {
$this->load->model('User');
$data['books'] = $this->User->getAuthor();
$this->load->view('vadd_books',$data);
}
my user_model model
function getAuthor() {
$this->db->select('author_firstname, author_lastname');
$this->db->from('authors');
$query = $this->db->get();
return $query->result();
}