ID: 38784
User updated by: jkeagle at knology dot net
-Reported By: keagle at westar dot com
+Reported By: jkeagle at knology dot net
Status: Open
Bug Type: Performance problem
Operating System: Windows XP
PHP Version: 4.4.4
New Comment:

Note: num_rows & num_fields were output and return valid numbers.

Previous Comments:

[2006-09-11 21:48:14] jkeagle at knology dot net

I'm having a problem getting 'odbc_fetch_row' to return true.
Therefore, I am unable to fetch each row of my table. Is there
something I'm leaving out in my code? I've tried everything I can think
of. Please help. Thank you.

Reproduce code:
$res = odbc_exec($conn, $sql);

$num_rows = odbc_num_rows($res);
$num_fields = odbc_num_fields($res);

$parameter_counter = 0;

if(odbc_fetch_row($res, 0))
echo("odbc_fetch_row: SUCCESS ...\n\n");
echo("odbc_fetch_row: FAILURE ...\n\n");

while(odbc_fetch_row($res)) {
$param_id = odbc_result($res, "PARAMETER_ID");
$description = odbc_result($res, "DESCRIPTION");

$mdr_parameters[$description] = $param_id;
$r = odbc_free_result($res);

Expected result:
I would have expected "SUCCESS" to be output as opposed the "FAILURE"
following the 'if' statement. And, I would have expected to fall into
the 'while' loop, but to no avail.

Actual result:
odbc_fetch_row: FAILURE ...


Edit this bug report at [url][/url]