$subSelect = $db->select()
->from('aktualne', array('n' => 'name'));
$subSelectString = '(' . $subSelect->__toString() . ')';
$select = $db->select()
->from(
array('akt' => new Zend_Db_Expr($subSelectString)),
array('n')
)
->where('akt.n = ?', 2008);
$db->fetchAll($select);
--
Hector
2009/9/29 sNop <snop3@seznam.cz>
Hi,
something like this:
SELECT `akt`.`n`
FROM (
SELECT `name` AS `n`
FROM `aktualne`
) AS `akt`
WHERE `akt`.`n` = '2008'
Support this Zend_Db_Select ?
Thank for any suggestions.
没有评论:
发表评论