Configuring a connection to a second database on the server
Permalink
Hi,
I have an additional database, which I've built before stumbling upon C5. What file am I editing to configure the connection to this database?
Also, when building my pages, I'd like to avoid adding the database configuration in each custom php block. So what file am I editing so that this configuration is called upon for the whole page?
I have an additional database, which I've built before stumbling upon C5. What file am I editing to configure the connection to this database?
Also, when building my pages, I'd like to avoid adding the database configuration in each custom php block. So what file am I editing so that this configuration is called upon for the whole page?
Or, if you specifically want to have a second database, you can add a global setting in concrete5 to store the connection string, and use it to setup your own ADODB connection with that.
Get/set config :
create an adodb connection :
check the Loader::db to know how to create a db Connection with ADODB
you could just put that code in your package, so you would only have to call it back.