Skip to content

Instantly share code, notes, and snippets.

@wdalmut
Created June 25, 2012 12:38
Show Gist options
  • Save wdalmut/2988337 to your computer and use it in GitHub Desktop.
Save wdalmut/2988337 to your computer and use it in GitHub Desktop.
Use fetch for ZF1 (fetchAll creates a big array)
<?php
$db = $model->getDbAdapterForCompany();
$stmt = $db->query('SELECT * FROM ' . $table);
while($row = $stmt->fetch(Zend_Db::FETCH_OBJ)) {
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment