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