Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 1944

Joomla! 5.x Coding • Reading data from an external database in a model

$
0
0
I am developing a component, and in one of the Models I need to access a table from a different database (that is on the same server). How can this be done in Joomla 5?

I can see that when the model is constructed, the array of configuration parameters includes a reference to the "local" database driver. I assume I must over-ride this before invoking parent::__construct - is this correct?

In Joomla 4, apparently (https://stackoverflow.com/questions/242 ... joomla-3-2) one called the parent first, then set up a new connection, then called

Code:

parent::setDbo($db);

Statistics: Posted by CharlieBigley — Sat Aug 17, 2024 9:58 am



Viewing all articles
Browse latest Browse all 1944

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>