|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-09-11 21:51 UTC] jkeagle at knology dot net
[2006-09-12 09:33 UTC] tony2001@php.net
[2006-09-12 13:40 UTC] jkeagle at knology dot net
[2006-09-12 14:59 UTC] keagle at westar dot com
[2006-09-12 16:45 UTC] tony2001@php.net
[2006-09-12 18:04 UTC] jkeagle at knology dot net
[2006-09-13 15:38 UTC] kalowsky@php.net
[2006-09-13 16:59 UTC] jkeagle at knology dot net
[2006-09-13 20:02 UTC] kalowsky@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 19:00:02 2025 UTC |
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 ...