|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-01-02 10:34 UTC] kfbombar at us dot ibm dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 03:00:01 2025 UTC |
Description: ------------ Running the function db2_num_rows() with the Windows DLL returns -1. Running the same code on a SLES machine returns the correct number. Reproduce code: --------------- $cnx = db2_pconnect($cnx_string, '', '', array( 'autocommit' => DB2_AUTOCOMMIT_ON, 'DB2_ATTR_CASE' => DB2_CASE_LOWER, 'CURSOR' => DB2_SCROLLABLE, )); $query = "SELECT * FROM mytable"; $result = db2_exec($cnx,$query); print "Row count: " . db2_num_rows($result) . "\n"; $count = 1; while(db2_fetch_assoc($result)) $count++; print "Real row count: {$count}\n"; Expected result: ---------------- Row count: 29 Real row count: 29 Actual result: -------------- Row count: -1 Real row count: 29