Articles tagged with "dsn database connect"

getDSN

By John Zimmerman
This returns the database connection details in the form of a DSN.

driver://username:password@hostname/database

This is useful if you have a 3rd party class that goes in /vendors that requires its own DSN information to work. (i.e. GoogleMapAPI class).

I put this function in /app/app_controller.php so that it is available to all other controllers if necessary.

Originally based on a post in the GoogleGroup .
[Read more]