Create query from another connection

vipzeus

Member
Im try to create e subquery in calc element but my tables are in another database on the same server.
What is the right syntax?
i tried this but does not work
Code:
//$myDb = FabrikWorker::getDbo(false, 2);
$myDb = \Joomla\CMS\Factory::getContainer(false, 2)->get('DatabaseDriver');
$query = $myDb->getQuery(true);
 
Why did you change the FabrikWorker:: ? It should do.
(AFAIK Joomla doesn't support multiple connections)
 
Joomla debug :
Since joomla/database 2.2.0: The parameter $new is deprecated and will be removed in 4.0, use Joomla\Database\DatabaseDriver::createQuery() instead.

With debug disabled i have not the error
 
Deprecated is only a notice.
I assume the "culprit" is
$query = $myDb->getQuery(true);

But I don't know the new syntax at the moment (maybe $query = $myDb->createQuery(); )
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top