Just need a hand understanding some simple database queries in ZF2. In ZF1 I have simple methods like this:
public function recordset() { // listing of all reco
You can avoid the foreach loop by doing the following:
$statement = $db->query($sql); /** @var $results Zend\Db\ResultSet\ResultSet */ $results = $statement->execute(); $data = $result->getResource()->fetchAll(); // Now data is an array