mariuz                                   Wed, 28 Dec 2011 09:41:02 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=321461

Log:
cleanup for bug 48877 test, add description

Bug: https://bugs.php.net/48877 (Closed) "bindValue" and "bindParam" do not 
work for PDO Firebird
      
Changed paths:
    A   php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_48877.phpt
    U   php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_48877.phpt
    U   php/php-src/trunk/ext/pdo_firebird/tests/bug_48877.phpt

Added: php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_48877.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_48877.phpt          
                (rev 0)
+++ php/php-src/branches/PHP_5_3/ext/pdo_firebird/tests/bug_48877.phpt  
2011-12-28 09:41:02 UTC (rev 321461)
@@ -0,0 +1,42 @@
+--TEST--
+PDO_Firebird: bug 48877 The "bindValue" and "bindParam" do not work for PDO 
Firebird if we use named parameters (:parameter).
+--SKIPIF--
+<?php extension_loaded("pdo_firebird") or die("skip"); ?>
+--FILE--
+<?php
+
+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)

Modified: php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_48877.phpt
===================================================================
--- php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_48877.phpt  
2011-12-28 09:31:18 UTC (rev 321460)
+++ php/php-src/branches/PHP_5_4/ext/pdo_firebird/tests/bug_48877.phpt  
2011-12-28 09:41:02 UTC (rev 321461)
@@ -1,9 +1,9 @@
 --TEST--
-PDO_Firebird: bug 48877 test
+PDO_Firebird: bug 48877 The "bindValue" and "bindParam" do not work for PDO 
Firebird if we use named parameters (:parameter).
 --SKIPIF--
 <?php extension_loaded("pdo_firebird") or die("skip"); ?>
 --FILE--
-<?php /* $Id: rowCount.phpt 316540 2011-09-12 13:41:28Z mariuz $ */
+<?php

 require("testdb.inc");


Modified: php/php-src/trunk/ext/pdo_firebird/tests/bug_48877.phpt
===================================================================
--- php/php-src/trunk/ext/pdo_firebird/tests/bug_48877.phpt     2011-12-28 
09:31:18 UTC (rev 321460)
+++ php/php-src/trunk/ext/pdo_firebird/tests/bug_48877.phpt     2011-12-28 
09:41:02 UTC (rev 321461)
@@ -1,9 +1,9 @@
 --TEST--
-PDO_Firebird: bug 48877 test
+PDO_Firebird: bug 48877 The "bindValue" and "bindParam" do not work for PDO 
Firebird if we use named parameters (:parameter).
 --SKIPIF--
 <?php extension_loaded("pdo_firebird") or die("skip"); ?>
 --FILE--
-<?php /* $Id: rowCount.phpt 316540 2011-09-12 13:41:28Z mariuz $ */
+<?php

 require("testdb.inc");


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to