Welcome Guest, Not a member yet? Register   Sign In
database name available within models

Is there a way to have access to the current database name (set up in database.php) in a model? I can always load the database config file, but it seems like so obvious a need that there's probably already an easier way I'm not aware of. Something like a
variable or a function tucked neatly away in the database class.

Any help to offer?


Works like a charm. Thanks. Is that in the User Guide? If not, where does one find little treats like that?

Not in the documentation anywhere I've seen... I just searched system/database for mysql_select_db.

Theme © iAndrew 2016 - Forum software by © MyBB