title: Zend Raw SQL Query
body: <p>I'm looking to execute a raw SQL query in a Zend Controller. </p>
  
  <p>I looked here <a href="http://framework.zend.com/manual/1.11/en/zend.db.statement.html" rel="nofollow">http://framework.zend.com/manual/1.11/en/zend.db.statement.html</a> and it says to do </p>
  
  <pre><code>    $sql = 'SELECT * FROM bugs WHERE reported_by = ? AND bug_status = ?';
  
      $stmt = new Zend_Db_Statement_Mysqli($db, $sql);
  
      $stmt-&gt;execute(array('goofy', 'FIXED'));
  </code></pre>
  
  <p>but whenever I do that it gives me an error cause of the $db.... What's $db supposed to hold cause it doesn't say anywhere in the documentation...</p>
  
  <p>Also whenever I'm done I would like to return an array with whatever the result was, what would I be able to do something like <code>$resultArray = $stmt-&gt;execute(array('goofy', 'FIXED'));</code> ???</p>
  
  <p>Thanks,</p>