Say I have 2 db configs:
$db['default']
$db['alternate']
And say I have loaded a db:
$this->load->db($db);
How can I check and see which db I've loaded?
Yes, I know you add a 2nd parameter and return the actual database, but that won't work for my current scenario. No, I can't just do a string compare of $db (we can assume we are in a totally different method or something where I don't [and can't] have access to $db)
Dont know if that's any help, but you can see loaded db configuration by accessing eg. $this->db->database this will return the database name that you are currently using
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With