Keeping pdo connection open across multiple modules?

by loranga   Last Updated May 04, 2018 21:10 PM

I have multiple modules on the same page that is connecting to the same external database through pdo connections inside the modules. The website is getting slower since I added more modules, my guess is that connecting multiple times to the same external db is slowing it down.

Now I want to connect one time to the external db and use this connection in the modules, how do I do this? I also want the website to be able to update without removing my code.

I like to use normal php query instead of the joomla query stuff, that is why I did not open a new connection to the external database with JFactory.

Thanks in advance, LnG

Related Questions

Testing Joomla site speed

Updated March 26, 2015 07:25 AM

File Cache option is missing

Updated March 28, 2015 10:03 AM