PHP  
 PHP_5_6
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/pdo_mysql/tests/pdo_mysql_stmt_rowcount.phpt ('MySQL PDOStatement->rowCount() @ SELECT')

Script

1: <?php
2:     
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR 'mysql_pdo_test.inc');
3:     
$db MySQLPDOTest::factory();
4:     
MySQLPDOTest::createTestTable($db);
5:
6:     try {
7:
8:         if (
!== ($tmp $db->query('SELECT id FROM test WHERE 1 = 0')->rowCount()))
9:             
printf("[002] Expecting 0 got %s"var_export($tmptrue));
10:
11:         if (
!== ($tmp $db->query('SELECT id FROM test WHERE id = 1')->rowCount()))
12:             
printf("[003] Expecting 1 got %s"var_export($tmptrue));
13:
14:     } catch (
PDOException $e) {
15:         
printf("[001] %s [%s] %s\n",
16:             
$e->getMessage(), $db->errorCode(), implode(' '$db->errorInfo()));
17:     }
18:
19:     print 
"done!";
20:
?>
21:

Expected

done!

Output

Out of memory

Diff

001+ Out of memory
001- done!

 

Generated at Mon, 27 Nov 2017 05:04:32 +0000 (15 days ago)

Copyright © 2005-2017 The PHP Group
All rights reserved.