CodeIgniter: Fatal error: Call to a member function select() on a non-object

kisun

New Member
I am getting the above error while I'm trying to trying to access a function from my library as shown...\[code\]<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');class My_crud {public function select_from($select, $from) { // dafaults $output = ""; // querying $this->db->select($select); $this->db->from($from); $query = $this->db->get(); // if no rows returned if ($uqery->num_rows == 0) { return $output = "No Results Found"; } // if row(s) retunred return $output = $query->result_array();}}\[/code\]while the \[code\]database\[/code\] library is set as autoload.
 
Top