All pastes #742641 Raw Edit

Someone

public text v1 · immutable
·published 2007-10-19 18:17 UTC
rendered paste body
                $budget_node = Doctrine_Query::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'",
                                		array($this->getId(),$budget->getStartDate()
                                		)
                                	)
                                ->groupBy('o.id')
                                ->execute();

		print_r($budget_node->transactions->mysum);
		print_r($budget_node->mysum);