src/Sql/Manager.php
public function updateTable($meta, ...$args)
    {
        $meta = !$meta instanceof Meta ? $this->mapper->getMeta($meta) : $meta;
        if (!$meta->canUpdate) {
            throw new Exception("Meta {$meta->id} prohibits update");
        }

        $query = Query\Update::fromParamArgs($args);
        if (!$query->set) {
            throw new \InvalidArgumentException("Query missing 'set' values");
        }

        list ($sql, $params, $setProps, $whereProps) = $query->buildQuery($meta);
        if ($setProps) {
            $params = $this->mapper->formatParams($meta, $setProps, $params);
        }
        if ($whereProps) {
            $params = $this->mapper->formatParams($meta, $whereProps, $params);
        }

        return $this->getConnector()->exec($sql, $params);
    }
public function updateTable($meta, ...$args)
    {
        $meta = !$meta instanceof Meta ? $this->mapper->getMeta($meta) : $meta;
        if (!$meta->canUpdate) {
            throw new Exception("Meta {$meta->id} prohibits update");
        }

        $query = Query\Update::fromParamArgs($args);
        if (!$query->set) {
            throw new \InvalidArgumentException("Query missing 'set' values");
        }

        list ($sql, $params, $setProps, $whereProps) = $query->buildQuery($meta);
        if ($setProps) {
            $params = $this->mapper->formatParams($meta, $setProps, $params);
        }
        if ($whereProps) {
            $params = $this->mapper->formatParams($meta, $whereProps, $params);
        }

        return $this->getConnector()->exec($sql, $params);
    }
public function updateTable ( $ meta , ... $ args ) { $ meta = ! $ meta instanceof Meta ? $ this -> mapper -> getMeta ( $ meta ) : $ meta ; if ( ! $ meta -> canUpdate ) { throw new Exception ( "Meta {$meta->id} prohibits update" ) ; } $ query = Query \ Update :: fromParamArgs ( $ args ) ; if ( ! $ query -> set ) { throw new \ InvalidArgumentException ( "Query missing 'set' values" ) ; } list ( $ sql , $ params , $ setProps , $ whereProps ) = $ query -> buildQuery ( $ meta ) ; if ( $ setProps ) { $ params = $ this -> mapper -> formatParams ( $ meta , $ setProps , $ params ) ; } if ( $ whereProps ) { $ params = $ this -> mapper -> formatParams ( $ meta , $ whereProps , $ params ) ; } return $ this -> getConnector ( ) -> exec ( $ sql , $ params ) ; }
Update a table by criteria.

updateTable ( $meta , array $values , $criteria... )
updateTable ( $meta , Query\Update $query , $criteria... )

@return void
Update a table by criteria .