public function exec($query, $values = array())
    {
        if ($stmt = $this->prepare($query)) {
            $result = $this->execute($stmt, $values);
            $this->close($stmt);
        }

        return (isset($result)) ? $result : false;
    }
public function exec($query, $values = array())
    {
        if ($stmt = $this->prepare($query)) {
            $result = $this->execute($stmt, $values);
            $this->close($stmt);
        }

        return (isset($result)) ? $result : false;
    }
public function exec ( $ query , $ values = array ( ) ) { if ( $ stmt = $ this -> prepare ( $ query ) ) { $ result = $ this -> execute ( $ stmt , $ values ) ; $ this -> close ( $ stmt ) ; } return ( isset ( $ result ) ) ? $ result : false ; }
Prepare and execute a query.

@param string|array $query  An SQL statement.
@param string|array $values The query parameters.

@return mixed Either ``false`` if there was a problem, or whatever the ``$db->execute()``d.

```php
$db->exec(array(
'CREATE TABLE employees (',
'  id INTEGER PRIMARY KEY,',
'  name TEXT NOT NULL DEFAULT "",',
'  title TEXT NOT NULL DEFAULT ""',
')',
));
```
Prepare and execute a query .