1--TEST-- 2PDO_Firebird: rowCount 3--SKIPIF-- 4<?php extension_loaded("pdo_firebird") or die("skip"); ?> 5--FILE-- 6<?php /* $Id$ */ 7 8require("testdb.inc"); 9 10$dbh = new PDO("firebird:dbname=$test_base",$user,$password) or die; 11 12@$dbh->exec('DROP TABLE testz'); 13$dbh->exec('CREATE TABLE testz (A VARCHAR(10))'); 14$dbh->exec("INSERT INTO testz VALUES ('A')"); 15$dbh->exec("INSERT INTO testz VALUES ('A')"); 16$dbh->exec("INSERT INTO testz VALUES ('B')"); 17$dbh->commit(); 18 19$query = "SELECT * FROM testz WHERE A = ?"; 20 21$stmt = $dbh->prepare($query); 22$stmt->execute(array('A')); 23$rows = $stmt->fetch(); 24$rows = $stmt->fetch(); 25var_dump($stmt->fetch()); 26var_dump($stmt->rowCount()); 27 28$stmt = $dbh->prepare('UPDATE testZ SET A="A" WHERE A != ?'); 29$stmt->execute(array('A')); 30var_dump($stmt->rowCount()); 31$dbh->commit(); 32 33$stmt = $dbh->prepare('DELETE FROM testz'); 34$stmt->execute(); 35var_dump($stmt->rowCount()); 36 37$dbh->commit(); 38 39$dbh->exec('DROP TABLE testz'); 40 41unset($stmt); 42unset($dbh); 43 44?> 45--EXPECT-- 46bool(false) 47int(2) 48int(1) 49int(3) 50