svn: /php/php-src/trunk/ext/pdo_firebird/tests/ bug_48877.phpt
| From: | Popa Adrian Marius | Date: | Tue, 27 Dec 2011 10:54:47 +0000 |
| Subject: | svn: /php/php-src/trunk/ext/pdo_firebird/tests/ bug_48877.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-67346@lists.php.net to get a copy of this message | ||
mariuz Tue, 27 Dec 2011 10:54:47 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=321433
Log:
PDO_Firebird: bug 48877 test
Bug: https://bugs.php.net/48877 (Closed)
"bindValue" and "bindParam" do not work for PDO Firebird
Changed paths:
A php/php-src/trunk/ext/pdo_firebird/tests/bug_48877.phpt
Added: php/php-src/trunk/ext/pdo_firebird/tests/bug_48877.phpt
===================================================================
--- php/php-src/trunk/ext/pdo_firebird/tests/bug_48877.phpt (rev 0)
+++ php/php-src/trunk/ext/pdo_firebird/tests/bug_48877.phpt 2011-12-27 10:54:47 UTC (rev 321433)
@@ -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)