/** * Performs a raw SQL query * * @param string $sql * @return integer * @throws Exception */ public function execute($sql) { $result = $this->connection->exec($sql); if ($result === false) { $info = $this->connection->errorInfo(); throw new Exception($info[2], $info[1]); } return $result; }