Welcome Guest, Not a member yet? Register   Sign In
Blog Tutorial
#1

[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
#2

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

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

Will have a look deeper into the issue


Regards

Fred
#4

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

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

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

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

Thanks again

Fred
#7

[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
#8

[eluser]defrey74[/eluser]
Hey Jamey,

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

Will have a look at the tutorials shortly

Fred




Theme © iAndrew 2016 - Forum software by © MyBB