Welcome Guest, Not a member yet? Register   Sign In
Issue with video tutorial...
#1

[eluser]Adam Mills[/eluser]
Hi all, just started using this today, decided to go through the tutorial. I'm on the second video tutorial and am experiencing an error. Tried doing a forum search to see if it was common, but didn't see anything come up. So here is my issue, hopefully someone can help.

Everything has worked fine up to this point ... I insert this line of code:

Code:
$data['query'] = $this->db->get('blog');

and I get this error:

Quote:Fatal error: Call to a member function on a non-object in [url info] on line 13

thanks in advance for any help...
#2

[eluser]SneakyDave[/eluser]
Have you loaded the database library in autoload.php? Not sure if that would be it, but it could be. Is it the first database call?

http://ellislab.com/codeigniter/user-gui...mples.html
#3

[eluser]Adam Mills[/eluser]
I put the database load in my autoload config file:
Code:
$autoload['core'] = array("database");

:/

And the scaffolding worked fine, could insert data just fine ... so ... I assume I have all the database stuff set up correctly.

It is indeed the first DB call.
#4

[eluser]Adam Mills[/eluser]
wow, ok ... perhaps I should read the comment in the file ... core is no longer right ... supposed to use the libraries ... got it now ... thanks Smile
#5

[eluser]Tom Glover[/eluser]
Have you set the database setting in the database config file?




Theme © iAndrew 2016 - Forum software by © MyBB