final public function updateColumns(array $data, array $allowedColumns = array())
    {
        foreach ($data as $column => $values) {
            foreach ($values as $id => $value) {
                // Protection. Update only defined columns
                if (!empty($allowedColumns) && !in_array($column, $allowedColumns)) {
                    continue;
                }

                $this->updateColumnByPk($id, $column, $value);
            }
        }

        return true;
    }
final public function updateColumns(array $data, array $allowedColumns = array())
    {
        foreach ($data as $column => $values) {
            foreach ($values as $id => $value) {
                // Protection. Update only defined columns
                if (!empty($allowedColumns) && !in_array($column, $allowedColumns)) {
                    continue;
                }

                $this->updateColumnByPk($id, $column, $value);
            }
        }

        return true;
    }
final public function updateColumns ( array $ data , array $ allowedColumns = array ( ) ) { foreach ( $ data as $ column => $ values ) { foreach ( $ values as $ id => $ value ) { // Protection. Update only defined columns if ( ! empty ( $ allowedColumns ) && ! in_array ( $ column , $ allowedColumns ) ) { continue ; } $ this -> updateColumnByPk ( $ id , $ column , $ value ) ; } } return true ; }
Update multiple columns at once

@param array $data
@param array $allowedColumns Optional protection for columns to be updated (purely for protection purposes)
@return boolean
Update multiple columns at once