I'm building a small plugin for EE and I need to retrieve the name of the database. ( specified in config > database.php )
But I can't seem to find any docs that point me in the right direction.
ExpressionEngine® Answers is a question and answer site for administrators, end users, developers and designers for ExpressionEngine® CMS. It only takes a minute to sign up.Sign up to join this community
The docs say that Database Class is initialized automatically.
A var_dump(ee()->db) show us that the name of database can be retrieved by, on EECMS 2.6+:
And on EECMS 2.5.5-: