This is wrong CodeIgniter CI_Model has no constructor so you cannot use
This is how it should be, see how the class name is ucfirst uppercase it also needs to be saved that way.
PHP Code:
class Dep_models extends CI_Model
{
private $oracle_db;
public function __construct() //model construct function
{
$this->oracle_db = $this->load->database('oracle',true); // oracle db
}
public function getDept()
{
$query = $this->oracle_db->get('departments')
->result();
return $query;
}
}
Of course you would need to add error checking on all of your database code.
Use Google to search for what you need.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )