Hi all,
Code bellow works just fine:

$dbh =
ServiceLocatorProvider::getInstance()->getServiceLocator()->get('dbConnection');

$query = "SELECT id FROM scheme";
$stmt = $dbh->prepare($query);
$result = $stmt->execute();

foreach ($result as $value) {
    echo var_dump($value);
}

The problem is instead using foreach I want to use something like
fetchAll(PDO::FETCH_COLUMN). I guess it's not possible with
Zend\Db\Adapter\Driver\ResultInterface? Any suggestions?

Regards,
S.

Reply via email to