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