Answers for "magento 2 db conecion to external db"

PHP
0

magento 2 db connection

$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$resource = $objectManager->get('MagentoFrameworkAppResourceConnection');
$connection = $resource->getConnection('MagentoFrameworkAppResourceConnection::DEFAULT_CONNECTION'); 
$results = $connection->fetchone($query);
Posted by: Guest on August-20-2020

Browse Popular Code Answers by Language