Someone
public text v1 · immutable $budget_node = sfDoctrine::connection()->query("
SELECT SUM(t.points), o.*
FROM Orgnode o, o.transactions t
WHERE o.id = ? AND t.created_at >= ? AND t.type = 'issue'
GROUP BY o.id",
array(
$this->getId(),
$budget->getStartDate()
)
)->getFirst()->SUM;