XF 2.0 Query a remote database

Rayman

Member
Hi,

One of my addons is dependent on a remote database. I would like the Setup.php, Entries, Finder...etc for this addon to run all the queries on a specific remote database instead of the localhost (website) database.

In XF1, I would normally use $db = XenForo_Application::get('db2'); and have db2 listed in the config.php.

How would I do this with XF2?
 
Having entities, finders, etc use it? Short answer is really going to be that you can't.

If you want to run raw queries, then you can just instantiate another DB adapter and connect to that server.
 
Back
Top Bottom