Can not connect to an external DB
Permalink
I need to read some data from an external DB in some of my custom blocks, but when I ask to concrete5 to connect to my 2nd DB, he just ignore me:
He attempt to run the query but connected to de main DB.
I know this code is from version 5.6, I tried to find son reference for 5.7 but with no luck.
Thanks for your help, I am now desperate.
$db = Loader::db(); $db = Loader::db( 'server2', 'user2', 'pass2', 'db2', true); $fts = $db->Execute('SELECT * FROM table2');
He attempt to run the query but connected to de main DB.
I know this code is from version 5.6, I tried to find son reference for 5.7 but with no luck.
Thanks for your help, I am now desperate.