php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38192 odbc_fetch_array returns false when there are more rows.
Submitted: 2006-07-23 18:55 UTC Modified: 2006-08-01 01:00 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: mail at asger dot dk Assigned:
Status: No Feedback Package: ODBC related
PHP Version: 5.1.4 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
31 - 27 = ?
Subscribe to this entry?

 
 [2006-07-23 18:55 UTC] mail at asger dot dk
Description:
------------
I have a script connecting to a Sybase Adaptive Server Anywhere 9. I iterate through the resultset like this:

while($row = odbc_fetch_array($res)) {
...
}

Sometimes when I try to fetch a large resultset the odbc_fetch_array returns false and the loop stops when there are more rows. The only way I can fetch all rows is to set the second argument to odbc_fetch_array where I force the function  to fetch a specific row. To get the actual number of rows I have to run a sql and count the number of rows before I get the resultset.

I'm not sure that this is a PHP problem, it could be the odbc driver or something else. But I don't know how to solve the problem or debug it further.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-24 06:13 UTC] tony2001@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


We don't know how to debug something we can't reproduce either.
 [2006-08-01 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 06:01:29 2024 UTC