How to connect to a second database
Posted: Wed Jul 17, 2019 7:44 am
I want to use data from an alternative database in a UDT in CMSMS 2.2.10.
I have tried to connect it like this:
However, the printed variable shows the information of the CMSMS database.
How can I connect to the other database?
I have tried to connect it like this:
Code: Select all
$alternativedb = array();
$alternativedbhost = '***';
$alternativedbuser = '***';
$alternativedbpswd = '***';
$alternativedbdbsn = '***';
$alternativedb = ADONewConnection('mysqli', 'pear:date:extend');
$alternativedb->Connect($alternativedbhost,$alternativedbuser,$alternativedbpswd,$alternativedbdbsn);
print_r($alternativedb);
How can I connect to the other database?