[eluser]mdzwarts[/eluser]
I want to retrieve information about the database i've connected, to inform the user which database they are using right now. I have a custom class for my standard output components from which I want to collect this info. How do I do this, properly?
I've tried out:
Code:
$LIB =& get_instance();
$LIB->$db['default']['database'];
and:
Code:
$db['default']['database'];
and:
Code:
config_item('database')
..but no such luck. It would seem to me none of the above should actually work, but I'm fairly new to both php and code igniter.Reason I want to be able to display, is that we will be using multiple environments, and making sure by visual check is a good way to know if we are editing the right database.