Skip to main content
deleted 11 characters in body
Source Link
alex_b
  • 716
  • 3
  • 8

It is better to implement new method in class of rad_inventorypieces/piece_collectionpiece resource model

Method might look like this:

/**
 * @return string
 */
public function getSumD()
{
    $select = $this->getReadConnection()
        ->select()
        ->from($this->getMainTable(), array('sum' => new Zend_Db_Expr('SUM(d)')));
    
    return $this->getReadConnection()->fetchOne($select)
}

It is better to implement new method in class of rad_inventorypieces/piece_collection resource model

Method might look like this:

/**
 * @return string
 */
public function getSumD()
{
    $select = $this->getReadConnection()
        ->select()
        ->from($this->getMainTable(), array('sum' => new Zend_Db_Expr('SUM(d)')));
    
    return $this->getReadConnection()->fetchOne($select)
}

It is better to implement new method in class of rad_inventorypieces/piece resource model

Method might look like this:

/**
 * @return string
 */
public function getSumD()
{
    $select = $this->getReadConnection()
        ->select()
        ->from($this->getMainTable(), array('sum' => new Zend_Db_Expr('SUM(d)')));
    
    return $this->getReadConnection()->fetchOne($select)
}
Source Link
alex_b
  • 716
  • 3
  • 8

It is better to implement new method in class of rad_inventorypieces/piece_collection resource model

Method might look like this:

/**
 * @return string
 */
public function getSumD()
{
    $select = $this->getReadConnection()
        ->select()
        ->from($this->getMainTable(), array('sum' => new Zend_Db_Expr('SUM(d)')));
    
    return $this->getReadConnection()->fetchOne($select)
}