Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>@ArtWorkAD is right in a certain way. But in your case you're not just using a Zend_Db_Select. You tried to extend a Zend_Db_Select obtained from a Zend_Db_Table (well, you should try to handle a Singleton pattern with Zend_Db_Table but this is another problem). Your current problem (if we except the fact you are certainly reading documentation too fast) is that this line was correct:</p> <pre><code> $select-&gt;setIntegrityCheck(false); </code></pre> <p>It make your 'select-from-a-zend-db-table' not anymore restricted to the Active Record Mode, and available for extra joins.</p> <p>But just after that you make a:</p> <pre><code>$select = new Zend_Db_Select($table); </code></pre> <p>This is the complete creation of a new object, that you put into your variable. Nothing is kept from previous variable value. You could add a <code>$select=null;</code> just before it would be the same. So this is just canceling the 3 previous lines.</p> <p>In quite the same confusion mode this line:</p> <pre><code>$select-&gt;setTable($table); </code></pre> <p>Is not necessary as you're already taking the select from a Zend_Db_Table so the table is already there.</p> <p><strong>EDIT</strong> And your last and bigger error is:</p> <pre><code>$table-&gt;fetchAll() </code></pre> <p>You do not use your built <code>$select</code> but your <code>$table</code>, so effectively everything done in your $select is ignored :-) . Fecthing from the <code>$select</code> shoudl give you better results</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload