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

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

$
0
0
Thank you Toivo for explaining how to generate a query against an external database, I can now get this to work outside a model.

However, my requirement is a bit more specific, in that I want a standard Model (based on ListModel) to access the external database for me. Normally the model allows one to use $this->_db to build the query, and of course this will usually point to the "normal" database. I believe I have to somehow over-ride this default setting, presumably in my __construct function.

If you could confirm my reasoning, and show me how to do it I would be grateful.

Statistics: Posted by CharlieBigley — Sat Aug 31, 2024 8:17 pm



Viewing all articles
Browse latest Browse all 1575

Trending Articles



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