Blog Tutorial

Hi there,

I have just started using CI & got a bit of an intro doing the tutorials.


I cannot connect to the database & the blog tutorial looks slightly different than the version i have got.

Any ideas what i could be doing wrong?

In autoload.php it says:

| -------------------------------------------------------------------
| Auto-load Core Libraries
| -------------------------------------------------------------------
| DEPRECATED: Use $autoload['libraries'] above instead.

$autoload['core'] = array('');

So to connect to my database i wrote:

| Auto-load Libraries
| -------------------------------------------------------------------
| These are the classes located in the system/libraries folder
| or in your system/application/libraries folder.
| Prototype:
| $autoload['libraries'] = array('database', 'session', 'xmlrpc');

$autoload['libraries'] = array('database');

I have viewed & re-viewed the video, check & re-check my files & i believe my problem is coming from the explanation above.

Thanks for your help



No that is right, the database should be loaded in the $autoload[’libraries’] = array('database');

That was quick! Thanks for your answer.

Will have a look deeper into the issue



[eluser]Pascal Kriete[/eluser]
Make sure your db server is running and the settings in config/database.php are correct. A small typo there will bring the whole thing down.

[eluser]Jamie Rumbelow[/eluser]
The Video tutorial is old - using an old version of CI. Check out my tutorials ( ) and browse the forums - i'm sure you are bound to find something.

Had a quick look, looks interesting...

Would you know any (new!!!) tutorials on db connection with CI?

Thanks again


[eluser]Jamie Rumbelow[/eluser]
Hey fred,

Elliot Haughin did some more recent tutorials that breifly cover db connection, but actually, that is a gap that needs to be filled!

Did you manage to get your script working?


Hey Jamey,

Yes, i have managed to get through...Thanks

Will have a look at the tutorials shortly


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.