Changed query to use Zend\Db\Query