EllisLab/CodeIgniter — Issue #802: PHP Fatal error:  Call to a member function get() on a non-object
Author: jlongino
Created: 2011-12-20 16:26:49+00:00
State: open

Hi:

I'm new with CodeIgniter 2.1.0, but I can't solve this:

load->model('Helloworld_model');

$data['result'] = $this->Helloworld_model->getData();
$data['page_title'] = "Hello World App!";

$this->load->view('Helloworld_view',$data);
}
}
?>

db->get('data');
$result = $query->result_array();

if ($result->num_rows()!=0) {
return $result;
} else {
show_error('Error en la base de datos');
}
}
}
?>

<?=$page_title?>

title?>

text?>

And database on mysql are:

database name: helloworld
table name: data

fields:

id int(11) not null autoincrement
title varchar(255)
text text

db engenie innodb

content:

id = 1
title = Hello world!
text = Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla sapien eros, lacinia eu, consectetur vel, dignissim et, massa. Praesent suscipit nunc vitae neque. Duis a ipsum. Nunc a erat. Praesent nec libero. Phasellus lobortis, velit sed pharetra imperdiet, justo ipsum facilisis arcu, in eleifend elit nulla sit amet tellus. Pellentesque molestie dui lacinia nulla. Sed vitae arcu at nisl sodales ultricies. Etiam mi ligula, consequat eget, elementum sed, vulputate in, augue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae.

thank's for all