Welcome Guest, Not a member yet? Register   Sign In
Database Connection (Confused by the bible)
#2

[eluser]TerryT[/eluser]
Per the user guide, in application/config/database.php enter your database information:

$db['default']['hostname'] = "localhost";
$db['default']['username'] = "root";
$db['default']['password'] = "";
$db['default']['database'] = "database_name";
$db['default']['dbdriver'] = "mysql";

I typically manually connect and use for the pages that need a database connection:

$this->load->database();

I would try this and make sure you can connect manually before trying to autoload.

To Autoload, look in the application/config/autoload.php file and just add the word 'database' to the library array that is listed in the file. That's it.

Someone else will have to answer your question about the navigation menu, but frankly you should work through some simpler examples first to get your head around this framework.

Terry


Messages In This Thread
Database Connection (Confused by the bible) - by El Forum - 10-20-2010, 01:54 AM
Database Connection (Confused by the bible) - by El Forum - 10-20-2010, 02:38 AM
Database Connection (Confused by the bible) - by El Forum - 10-20-2010, 02:57 AM
Database Connection (Confused by the bible) - by El Forum - 10-20-2010, 03:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB