Undefined property: Blog::$db |
[eluser]featureBlend[/eluser]
I am receiving PHP error: Undefined property: Blog::$db - while connecting to my database. Here is the code i used in the controller blog.php: Code: <?php and here's the code for the the View file: blog_view.php Code: <html> I am not using shorthand codes for php since i am on a local server and dont know how to enable it...Yes i have setup all the files for the database Any thoughts? I know im a newbie, but the minute i figure out how it works, the rest will become trivial.
[eluser]pistolPete[/eluser]
You need to load the database class. Have a look at the documentation: http://ellislab.com/codeigniter/user-gui...cting.html Either you load it manually using Code: $this->load->database();
[eluser]featureBlend[/eluser]
Thank you PistolPete, appreciated.... BTW if you all want to your server to accept PHP shorthand codes please change that in your php.ini file.
|
Welcome Guest, Not a member yet? Register Sign In |