Problem with the db->get('') function |
[eluser]Unknown[/eluser]
Hello, I;m a newby in CI, i am doing the blog tutorial but in the db conection step apears a problem in my brower, this is the error A PHP Error was encountered Severity: Notice Message: Undefined property: Blog::$db Filename: controllers/blog.php Line Number: 13 and this is the code of blog.php Code: <?php I have been checking this file and i can not find eny erros , i hope you can help me
[eluser]Dam1an[/eluser]
You need to either manually load the database or autoload it
[eluser]Gordaen[/eluser]
As Dam1an said, you need: Code: $this->load->database();
[eluser]Unknown[/eluser]
Thanks it works perfectly, in the tuto were nothing about loading the database class
[eluser]Colin Williams[/eluser]
Which tuto are you talking about? It's the first item on http://ellislab.com/codeigniter/user-gui...mples.html |
Welcome Guest, Not a member yet? Register Sign In |