Doctrine query returns extra field in result
问题 I have a Doctrine query; $q = Doctrine_Query::create()->select('s.monthly_volume') ->from('SearchVolume s') ->innerJoin('s.Keywords k') ->where('k.group_id = ?',array($group_id)); I just want it to return the monthly_volume value in the result array. It currently returns monthly_volume and id, I don't want it to return the id in result. 回答1: Doctrine automatically adds the primary key field to the results in almost every type of hydration mode. In a case like this where you want a simple