Welcome Guest, Not a member yet? Register   Sign In
query executing problem
#1

[eluser]new kid[/eluser]
$sql = $this->db->query( $query);


showing this error



A PHP Error was encountered

Severity: Notice

Message: Undefined property: Admin_model::$db

Filename: models/admin_model.php

Line Number: 18
#2

[eluser]MWebber[/eluser]
Check if the database library is loaded in config/autoload.php or by adding
Code:
$this->load->library('database');
before the query
#3

[eluser]new kid[/eluser]
thnx but not working showing this error now


Unable to load the requested class: database
#4

[eluser]MWebber[/eluser]
try this:

Code:
$this->load->database();
#5

[eluser]new kid[/eluser]
thanks man
it works
#6

[eluser]f0n3man[/eluser]
i am having a similar problem, but am getting the error message from the controller that the property Site::$site_model is undefined. i have the database library autoloaded, and even have the model loaded in the controller, and still get the same error message. i have done this in two different installations with 2 different versions. i can access the database and pull records. from the controller. i am brand new to codeigniter, but so far am not impressed as i can't get it to work properly. any other ideas?




Theme © iAndrew 2016 - Forum software by © MyBB