Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

magento 2 get connection

$om = MagentoFrameworkAppObjectManager::getInstance();
$connectionO = $om->create('MagentoFrameworkAppResourceConnection');
$connection= $connectionO->getConnection();

$sql = 'some query';
$results = $connection->fetchAll($sql);
 
PREVIOUS NEXT
Tagged: #magento #connection
ADD COMMENT
Topic
Name
7+1 =