Need help using Zend\Db\Sql\Select. Can't figure out what I'm doing wrong, it outputs nothing and no errors displayed.
namespace Album\Model;
use Zend\Db\Adapter\Adapter,
Zend\Db\Sql\Select;
class AlbumTable
{
public function getAll()
{
$select = new Select('album');
return $select->from();
}
}
namespace Album\Controller;
class AlbumController extends AbstractActionController
{
public function indexAction()
{
return new Viewmodel(array(
'rows' => $this->albumTable->useSelect()
));
}
}
// index.phtml
foreach ($this->rows as $row) { echo $row->artist . '<br />'; }
Thanks