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--ENV--
8LSAN_OPTIONS=detect_leaks=0
9--FILE--
10<?php
11
12require("testdb.inc");
13
14$value = '2';
15
16$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
17@$dbh->exec('DROP TABLE testz');
18$dbh->exec('CREATE TABLE testz (A integer)');
19$dbh->exec("INSERT INTO testz VALUES ('1')");
20$dbh->exec("INSERT INTO testz VALUES ('2')");
21$dbh->exec("INSERT INTO testz VALUES ('3')");
22$dbh->commit();
23
24$query = "SELECT * FROM testz WHERE A = :paramno";
25
26$stmt = $dbh->prepare($query);
27$stmt->bindParam(':paramno', $value, PDO::PARAM_STR);
28$stmt->execute();
29$rows = $stmt->fetch();
30var_dump($stmt->fetch());
31var_dump($stmt->rowCount());
32
33
34$stmt = $dbh->prepare('DELETE FROM testz');
35$stmt->execute();
36
37$dbh->commit();
38
39$dbh->exec('DROP TABLE testz');
40
41unset($stmt);
42unset($dbh);
43
44?>
45--EXPECT--
46bool(false)
47int(1)
48