Welcome Guest, Not a member yet? Register   Sign In
database info - retrievable?
#1

[eluser]theprodigy[/eluser]
Hey, my apologies if this has already been asked, but my quick glance through forum searching didn't find anything.

Is there a way in a controller (or model) to retrieve the database information stored in the database.php config file?

I need the info stored in
Code:
$db['default']['database'] = "db_name";

Please help,

Thanks
#2

[eluser]Dam1an[/eluser]
you can include the database file, and then access the $db array variable

Code:
include APPPATH.'config/databae.php';
echo $db['default']['database'];




Theme © iAndrew 2016 - Forum software by © MyBB