title: symfony 1.4 propel 1.6 : sum
body: <p>I'm trying to get a sum of columns in propel. My code</p>
  
  <pre><code>$c = new Criteria();
  $c-&gt;add(valuePeer::OWNER_ID, $this-&gt;getId());
  $c-&gt;addSelectColumn('SUM(' . valuePeer::VALUE . ') as total');
  $c-&gt;addGroupByColumn(valuePeer::VALUE);
  
  $sum = valuePeer::DoSelect($c);
  </code></pre>
  
  <p>printing out <code>$sum</code> returns nothing (not even an empty object). all i get is <code>Notice: Undefined offset: 1 in /.../lib/model/om/BaseValue.php on line 203 Notice: Undefined offset: 2 in /.../lib/model/om/BaseValue.php on line 204</code></p>
  
  <p>I tried this approach with <code>::DoSelectRS($c)</code> as suggested <a href="http://oldforum.symfony-project.org/index.php/m/20554/" rel="nofollow">here</a> and multiple other discussions but i get an error : <code>Fatal error: Call to undefined method ValuePeer::DoSelectRS() in /.../lib/model/Restauracia.php on line 39</code>.</p>
  
  <p>Can anyone please tell me what is the right approach on this then?</p>