public function updateAttributes($attrs)
    {
        $cls     = $this->_cls;
        $table   = $this->_builder->table;
        $where   = $this->_builder->where;
        $escape  = Driver::$escape_char;

        $sql   = "update $escape$table$escape set ";
        $sql  .= $cls::extractUpdateColumns($attrs, ",");
        $vals  = $cls::extractWhereValues($attrs);

        if (!empty($where)) {
            $sql .= " where $where";
        }
        $nval = array_merge($vals, is_array($this->_vals) ? $this->_vals : array());
        return $cls::executePrepared($sql, $nval);
    }
public function updateAttributes($attrs)
    {
        $cls     = $this->_cls;
        $table   = $this->_builder->table;
        $where   = $this->_builder->where;
        $escape  = Driver::$escape_char;

        $sql   = "update $escape$table$escape set ";
        $sql  .= $cls::extractUpdateColumns($attrs, ",");
        $vals  = $cls::extractWhereValues($attrs);

        if (!empty($where)) {
            $sql .= " where $where";
        }
        $nval = array_merge($vals, is_array($this->_vals) ? $this->_vals : array());
        return $cls::executePrepared($sql, $nval);
    }
public function updateAttributes ( $ attrs ) { $ cls = $ this -> _cls ; $ table = $ this -> _builder -> table ; $ where = $ this -> _builder -> where ; $ escape = Driver :: $ escape_char ; $ sql = "update $escape$table$escape set " ; $ sql .= $ cls :: extractUpdateColumns ( $ attrs , "," ) ; $ vals = $ cls :: extractWhereValues ( $ attrs ) ; if ( ! empty ( $ where ) ) { $ sql .= " where $where" ; } $ nval = array_merge ( $ vals , is_array ( $ this -> _vals ) ? $ this -> _vals : array ( ) ) ; return $ cls :: executePrepared ( $ sql , $ nval ) ; }
Update collection attributes

Example:
echo Person::all()->updateAttributes("age", 25);

@param string $attrs attributes

@return updated or not
Update collection attributes