1--TEST--
2PDO_Firebird: bug 48877 The "bindValue" and "bindParam" do not work for PDO Firebird if we use named parameters (:parameter).
3--EXTENSIONS--
4pdo_firebird
5--SKIPIF--
6<?php require('skipif.inc'); ?>
7--XLEAK--
8A bug in firebird causes a memory leak when calling `isc_attach_database()`.
9See https://github.com/FirebirdSQL/firebird/issues/7849
10--FILE--
11<?php
12
13require("testdb.inc");
14
15$value = '2';
16
17$dbh = getDbConnection();
18$dbh->exec('CREATE TABLE test48877 (A integer)');
19$dbh->exec("INSERT INTO test48877 VALUES ('1')");
20$dbh->exec("INSERT INTO test48877 VALUES ('2')");
21$dbh->exec("INSERT INTO test48877 VALUES ('3')");
22
23$query = "SELECT * FROM test48877 WHERE A = :paramno";
24
25$stmt = $dbh->prepare($query);
26$stmt->bindParam(':paramno', $value, PDO::PARAM_STR);
27$stmt->execute();
28$rows = $stmt->fetch();
29var_dump($stmt->fetch());
30var_dump($stmt->rowCount());
31
32
33$stmt = $dbh->prepare('DELETE FROM test48877');
34$stmt->execute();
35
36unset($stmt);
37unset($dbh);
38
39?>
40--CLEAN--
41<?php
42require 'testdb.inc';
43$dbh = getDbConnection();
44@$dbh->exec("DROP TABLE test48877");
45unset($dbh);
46?>
47--EXPECT--
48bool(false)
49int(1)
50