Hi All,
I'm developing a custom module that has to fetch data from an external mysql database. By external I mean a database that resides on another server that is already used by users connecting to it from all over the world.
I was digging into the core adodb functions to find something that could put me on the right track.
The way I see it now, I would need to recreate (copy) the connect functions and modify them, so they are pointed to the external db.
The problem with this is, that I don't know how deep I will need to dig into the core to copy all those functions and modify them accordingly.
Is there another way to achieve an external connection?
Btw I'am on 2.1.3.
Thanks,
Frank.
Connect to an external database
Re: Connect to an external database
We are currently using a somewhat modified version of an external library, adodblite, you can find some docs here: http://adodblite.sourceforge.net/index.html
Connecting : http://adodblite.sourceforge.net/howtoinstall.php
In CMSMS 2.2 this will change though and that method will probably not work anymore. But to connect to an external db you can also use other valid PHP method: http://www.w3schools.com/php/php_mysql_connect.asp
Connecting : http://adodblite.sourceforge.net/howtoinstall.php
In CMSMS 2.2 this will change though and that method will probably not work anymore. But to connect to an external db you can also use other valid PHP method: http://www.w3schools.com/php/php_mysql_connect.asp
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Connect to an external database
Thanks Jo Morg,
I think I'll go with the direct connection, as this reduces the change of breaking the module in case of a CMSMS update.
Cheers.
Frank.
I think I'll go with the direct connection, as this reduces the change of breaking the module in case of a CMSMS update.
Cheers.
Frank.