src/Db.php
public function exec($sql, array $parameters = [])
    {
        $statement = $this->executeQuery($sql, $parameters);

        return $statement->rowCount();
    }
public function exec($sql, array $parameters = [])
    {
        $statement = $this->executeQuery($sql, $parameters);

        return $statement->rowCount();
    }
public function exec ( $ sql , array $ parameters = [ ] ) { $ statement = $ this -> executeQuery ( $ sql , $ parameters ) ; return $ statement -> rowCount ( ) ; }
Execute an SQL statement and return the number of affected rows.

@param string $sql
@param array  $parameters
@return int The number of rows affected
Execute an SQL statement and return the number of affected rows .