2010-05-16 4 views

Répondre

2

Peut-être quelque chose comme ça pourrait fonctionner:

$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() . ')') 
); 
Questions connexes