summaryrefslogtreecommitdiff
path: root/ext/pdo_firebird
diff options
context:
space:
mode:
authorPopa Adrian Marius <mariuz@php.net>2011-12-27 10:54:47 (GMT)
committerPopa Adrian Marius <mariuz@php.net>2011-12-27 10:54:47 (GMT)
commit13ed989dd21fbc0b6db9b6a7333db8d546a42f58 (patch)
tree36b975d0a9d04a4433da2c9b468171a24d3dbaeb /ext/pdo_firebird
parent20e2db2ce3d553e5dbd70547696e06f2a615377d (diff)
downloadphp-13ed989dd21fbc0b6db9b6a7333db8d546a42f58.tar.gz
PDO_Firebird: bug 48877 test
Diffstat (limited to 'ext/pdo_firebird')
-rw-r--r--ext/pdo_firebird/tests/bug_48877.phpt42
1 files changed, 42 insertions, 0 deletions
diff --git a/ext/pdo_firebird/tests/bug_48877.phpt b/ext/pdo_firebird/tests/bug_48877.phpt
new file mode 100644
index 0000000..07b734b
--- /dev/null
+++ b/ext/pdo_firebird/tests/bug_48877.phpt
@@ -0,0 +1,42 @@
+--TEST--
+PDO_Firebird: bug 48877 test
+--SKIPIF--
+<?php extension_loaded("pdo_firebird") or die("skip"); ?>
+--FILE--
+<?php /* $Id: rowCount.phpt 316540 2011-09-12 13:41:28Z mariuz $ */
+
+require("testdb.inc");
+
+$dbh = new PDO("firebird:dbname=$test_base",$user,$password) or die;
+$value = '2';
+@$dbh->exec('DROP TABLE testz');
+$dbh->exec('CREATE TABLE testz (A integer)');
+$dbh->exec("INSERT INTO testz VALUES ('1')");
+$dbh->exec("INSERT INTO testz VALUES ('2')");
+$dbh->exec("INSERT INTO testz VALUES ('3')");
+$dbh->commit();
+
+$query = "SELECT * FROM testz WHERE A = :paramno";
+
+$stmt = $dbh->prepare($query);
+$stmt->bindParam(':paramno', $value, PDO::PARAM_STR);
+$stmt->execute();
+$rows = $stmt->fetch();
+var_dump($stmt->fetch());
+var_dump($stmt->rowCount());
+
+
+$stmt = $dbh->prepare('DELETE FROM testz');
+$stmt->execute();
+
+$dbh->commit();
+
+$dbh->exec('DROP TABLE testz');
+
+unset($stmt);
+unset($dbh);
+
+?>
+--EXPECT--
+bool(false)
+int(1)