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