Answers for "connecting to database magento2"

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

Code answers related to "connecting to database magento2"

Browse Popular Code Answers by Language