Using models like in CodeIgniter

edited March 2011 in Modules
In my CodeIgniter projects I get the data from my database trough the model like this:

class Inhoud_model extends Model
function getInhoud($id)
$this->db->where("ID", $id);
$this->db->where("published", 1);

$query = $this->db->get();

if($query->num_rows() == 1)
return $query->result();

Then I import my model in the Controller like this: $this->load->model('Inhoud_model');

Why is this not working in Fuel CMS? Also when I extends MY_Model it's still not working.

Does this mean i've to change all my models to let this work?


  • edited 2:21PM
    What do you mean by not work? Is it throwing an error, or just not returning data etc? I'm not seeing anything immediately that would be a problem and something like that should work.
  • edited March 2011
    I got a server error. The page is not showing.
    HTTP Error 500
  • edited 2:21PM
    I got it. I don't know why but it's working now :)
Sign In or Register to comment.