View Single Post
  #2 (permalink)  
Old 02-27-2008, 03:35 AM
notrub225 notrub225 is offline
Senior Member
 
Join Date: Jan 2008
Location: chicago
Posts: 100
Default

Zend_Db_Table already allows you to make joins.

Code:
<?php

$table = new Bugs();

$select = $table->select()->setIntegrityCheck(false);
$select->where('bug_status = ?', 'NEW')
       ->join('accounts', 'accounts.account_id = bugs.reported_by', 'account_name')
       ->where('accounts.account_name = ?', 'Bob');

$rows = $table->fetchAll($select);
Reply With Quote