This repository has been archived on 2025-02-26. You can view files and clone it, but cannot push or open issues or pull requests.
szurubooru/src/PDOEx.php
2014-10-18 18:48:34 +02:00

25 lines
426 B
PHP

<?php
namespace Szurubooru;
class PDOEx extends \PDO
{
private $queryCount = 0;
private $statements = [];
public function prepare($statement, $driverOptions = [])
{
++ $this->queryCount;
$this->statements[] = $statement;
return parent::prepare($statement, $driverOptions);
}
public function getQueryCount()
{
return $this->queryCount;
}
public function getStatements()
{
return $this->statements;
}
}