I have custom model with 4 fields(a,b,c,d). I need sum of "d" field. So my solution using collection loop the d values and make the sum.For this is any simple solution? Thanks in advance.
$available=0;
$pieces = Mage::getResourceModel('rad_inventorypieces/piece_collection')
foreach($pieces as piece)
{
$available=+$piece->getAvailable();
}