2010-05-16 82 views

回答

2

也許類似的東西會工作:

$nestedSelect = $db->select()->from(
    array('MT2' => 'MyTable'), 
    new Zend_Db_Expr('MAX(MT2.date)') 
); 

$select = $db->select()->from(
    array('MT1', 'MyTable') 
)->where(
    'MT1.date = ?', new Zend_Db_Expr('(' . $nestedSelect->toString() . ')') 
);