1--TEST-- 2MySQL PDOStatement->rowCount() @ SELECT 3--SKIPIF-- 4<?php 5require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); 6require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); 7MySQLPDOTest::skip(); 8?> 9--FILE-- 10<?php 11 require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); 12 $db = MySQLPDOTest::factory(); 13 MySQLPDOTest::createTestTable($db); 14 15 try { 16 17 if (0 !== ($tmp = $db->query('SELECT id FROM test WHERE 1 = 0')->rowCount())) 18 printf("[002] Expecting 0 got %s", var_export($tmp, true)); 19 20 if (1 !== ($tmp = $db->query('SELECT id FROM test WHERE id = 1')->rowCount())) 21 printf("[003] Expecting 1 got %s", var_export($tmp, true)); 22 23 } catch (PDOException $e) { 24 printf("[001] %s [%s] %s\n", 25 $e->getMessage(), $db->errorCode(), implode(' ', $db->errorInfo())); 26 } 27 28 print "done!"; 29?> 30--CLEAN-- 31<?php 32require dirname(__FILE__) . '/mysql_pdo_test.inc'; 33MySQLPDOTest::dropTestTable(); 34?> 35--EXPECTF-- 36done! 37