public function getNextWeight($collection_id)
    {
        $sql = 'SELECT MAX(weight) FROM collection_item WHERE collection_id=?';
        $weight = (int) $this->db->fetchColumn($sql, array($collection_id));
        return ++$weight;
    }
public function getNextWeight($collection_id)
    {
        $sql = 'SELECT MAX(weight) FROM collection_item WHERE collection_id=?';
        $weight = (int) $this->db->fetchColumn($sql, array($collection_id));
        return ++$weight;
    }
public function getNextWeight ( $ collection_id ) { $ sql = 'SELECT MAX(weight) FROM collection_item WHERE collection_id=?' ; $ weight = ( int ) $ this -> db -> fetchColumn ( $ sql , array ( $ collection_id ) ) ; return ++ $ weight ; }
Returns the next possible weight for a collection item
@param integer $collection_id
@return integer
Returns the next possible weight for a collection item