From:             keagle at westar dot com
Operating system: Windows XP
PHP version:      4.4.4
PHP Bug Type:     Performance problem
Bug description:  odbc_fetch_row call

Description:
------------
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:
---------------
$sql = "SELECT PARAMETER_ID, DESCRIPTION from MDR_PARAM"; 
$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");
else
    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;
    $parameter_counter++;
}
$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 bug report at http://bugs.php.net/?id=38784&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=38784&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=38784&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=38784&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=38784&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=38784&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=38784&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=38784&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=38784&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=38784&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=38784&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=38784&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=38784&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=38784&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=38784&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=38784&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=38784&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=38784&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=38784&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=38784&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=38784&r=mysqlcfg

Reply via email to