Doctrine\DBAL\Statement::__construct PHP Method

__construct() public method

Creates a new Statement for the given SQL and Connection.
public __construct ( string $sql, Doctrine\DBAL\Connection $conn )
$sql string The SQL of the statement.
$conn Doctrine\DBAL\Connection The connection on which the statement should be executed.
    public function __construct($sql, Connection $conn)
    {
        $this->sql = $sql;
        $this->stmt = $conn->getWrappedConnection()->prepare($sql);
        $this->conn = $conn;
        $this->platform = $conn->getDatabasePlatform();
    }