[eluser]-spy-[/eluser]
im trying to retrieve my data from the database...but error occured
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Profile::$Student
Filename: controllers/profile.php
Line Number: 11
Fatal error: Call to a member function view_list() on a non-object in D:\Program Files\xampp\htdocs\pupcomm\system\application\controllers\profile.php on line 11...
here's my codes in
controller
Code:
<?php
class Profile extends Controller {
function Profile()
{
parent::Controller();
}
function history()
{
$data['query'] = $this->Student->view_list();
$this->load->view('profile/history',$data);
}
}
?>
model
Code:
<?php
class Student extends Model {
function Student()
{
parent::Model();
}
function view_list()
{
$query = $this->db->get('sample_recordlist');
return $query->result();
}
}
?>
is there anything wrong?