1--TEST--
2PDO_Firebird: bug 48877 The "bindValue" and "bindParam" do not work for PDO Firebird if we use named parameters (:parameter).
3--SKIPIF--
4<?php extension_loaded("pdo_firebird") or die("skip"); ?>
5--FILE--
6<?php
7
8require("testdb.inc");
9
10$dbh = new PDO("firebird:dbname=$test_base",$user,$password) or die;
11$value = '2';
12@$dbh->exec('DROP TABLE testz');
13$dbh->exec('CREATE TABLE testz (A integer)');
14$dbh->exec("INSERT INTO testz VALUES ('1')");
15$dbh->exec("INSERT INTO testz VALUES ('2')");
16$dbh->exec("INSERT INTO testz VALUES ('3')");
17$dbh->commit();
18
19$query = "SELECT * FROM testz WHERE A = :paramno";
20
21$stmt = $dbh->prepare($query);
22$stmt->bindParam(':paramno', $value, PDO::PARAM_STR);
23$stmt->execute();
24$rows = $stmt->fetch();
25var_dump($stmt->fetch());
26var_dump($stmt->rowCount());
27
28
29$stmt = $dbh->prepare('DELETE FROM testz');
30$stmt->execute();
31
32$dbh->commit();
33
34$dbh->exec('DROP TABLE testz');
35
36unset($stmt);
37unset($dbh);
38
39?>
40--EXPECT--
41bool(false)
42int(1)
43