2010-11-10 54 views

回答

2
$c = new Criteria(); 
$c->addSelectColumn(aPeer::TABLE_NAME.'.*'); 
$c->addAsColumn('count', '(SELECT COUNT(*) FROM b WHERE b.col1 = a.col2)'); 
aPeer::doSelect($c); 
相關問題