CodeIgniter Forums
Blog Tutorial - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Blog Tutorial (/thread-7709.html)



Blog Tutorial - El Forum - 04-20-2008

[eluser]defrey74[/eluser]
Hi there,

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

Issue!?...

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


Regards


Fred


Blog Tutorial - El Forum - 04-20-2008

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


Blog Tutorial - El Forum - 04-20-2008

[eluser]defrey74[/eluser]
WhAAAOU...
That was quick! Thanks for your answer.

Will have a look deeper into the issue


Regards

Fred


Blog Tutorial - El Forum - 04-20-2008

[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.


Blog Tutorial - El Forum - 04-20-2008

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


Blog Tutorial - El Forum - 04-21-2008

[eluser]defrey74[/eluser]
Had a quick look, looks interesting...

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

Thanks again

Fred


Blog Tutorial - El Forum - 04-21-2008

[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?

Jamie


Blog Tutorial - El Forum - 04-21-2008

[eluser]defrey74[/eluser]
Hey Jamey,

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

Will have a look at the tutorials shortly

Fred