Welcome Guest, Not a member yet? Register   Sign In
uknow error
#1

[eluser]674DBK[/eluser]
hi...

i want to load my model.. got this error

model locate : system/application/models/sekolah_model.php

Code:
<?php

class sekolah_model extends Model {



    function sekolah_model()

    {

        parent::Model();

    }


    function getSekolah ()

    {

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

            return $query;

    }



}

?>


controller locate : system/application/controller/sekolah.php

Code:
<?php
class Sekolah extends Controller {

    function Sekolah()
    {
        parent::Controller();
                $this->load->model('sekolah_model');

    }
    
    function index()
    {
        
                $query = $this->sekolah_model->getSekolah();
                $row = $query->row();
}
}

Quote:A PHP Error was encountered

Severity: Notice

Message: Undefined property: sekolah_model::$db

Filename: models/sekolah_model.php

Line Number: 11

Fatal error: Call to a member function get() on a non-object in /home/dbk/kpe/system/application/models/sekolah_model.php on line 11


Messages In This Thread
uknow error - by El Forum - 11-21-2009, 11:24 AM
uknow error - by El Forum - 11-21-2009, 01:18 PM
uknow error - by El Forum - 11-21-2009, 05:06 PM



Theme © iAndrew 2016 - Forum software by © MyBB