I have a query which takes less than a second to execute from iNavigator. When I run the same query from a php script and then loop through it using:
$numRows ends up only being a fraction of the expected result set and I get this error in the Zend logs:
Note that the value of $numRows varies every time I run it. It is almost like it is timing out and ending before it can iterate through all of the result sets, but the page loads in seconds. Outside of results missing from the result set everything seems to function and load perfectly fine on the page.
Does anyone know what might be contributing to this behavior?
V7R2
PHP v5.6.5
Zend Server v8.0.2
Code:
$numRows = 0; while ($row = db2_fetch_assoc($stmt)) { //Do stuff $numRows++; } echo $numRows++;
Code:
PHP Warning: db2_fetch_assoc(): Fetch Failure in /path/to/script.php on line XXX
Does anyone know what might be contributing to this behavior?
V7R2
PHP v5.6.5
Zend Server v8.0.2
Comment