|
|
@@ -1078,8 +1078,10 @@ $rows = $table->fetchAll($select);
|
|
|
<programlisting language="php"><![CDATA[
|
|
|
$table = new Bugs();
|
|
|
|
|
|
-$select = $table->select();
|
|
|
-$select->where('bug_status = ?', 'NEW')
|
|
|
+// retrieve with from part set, important when joining
|
|
|
+$select = $table->select(Zend_Db_Table::SELECT_WITH_FROM_PART);
|
|
|
+$select->setIntegrityCheck(false)
|
|
|
+ ->where('bug_status = ?', 'NEW')
|
|
|
->join('accounts', 'accounts.account_name = bugs.reported_by')
|
|
|
->where('accounts.account_name = ?', 'Bob');
|
|
|
|
|
|
@@ -1108,7 +1110,7 @@ $rows = $table->fetchAll($select);
|
|
|
<programlisting><![CDATA[
|
|
|
$table = new Bugs();
|
|
|
|
|
|
-$select = $table->select()->setIntegrityCheck(false);
|
|
|
+$select = $table->select(Zend_Db_Table::SELECT_WITH_FROM_PART)->setIntegrityCheck(false);
|
|
|
$select->where('bug_status = ?', 'NEW')
|
|
|
->join('accounts',
|
|
|
'accounts.account_name = bugs.reported_by',
|