All pastes #742605 Raw Edit

Someone

public text v1 · immutable
·published 2007-10-19 17:39 UTC
rendered paste body
		$budget_node = sfDoctrine::create()
                                ->select('SUM(t.points) mysum, o.*')
                                ->from('Orgnode o')
                                ->innerJoin('o.Transactions t')
                                ->where("o.id = ? AND t.created_at >= ? AND t.type = 'issue'")
                                ->groupBy('o.id')
                                ->execute(array($this->getId(),$budget->getStartDate()),Doctrine::FETCH_ARRAY)

               print_r($budget_node);  

you would see

Array(
  0=> array(
       o.field1 => value
       o.field2 => value
       o.Transactions => Array( 
                          0=> array(mysum=>number)
                         )
       )
  1=>...
)