note 76627 added to function.odbc-fetch-array
| From: | luke at croslow dot com | Date: | Mon, 23 Jul 2007 17:18:03 +0000 |
| Subject: | note 76627 added to function.odbc-fetch-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-128846@lists.php.net to get a copy of this message | ||
On IBM DB2 for iSeries I have to specify a specific row number to retrieve. If I don't specify
the row number, the behavior is erratic.
This seems to work:
<?php
for($i=1;$row=odbc_fetch_row($result,$i);$i++) {
//use $row
}
?>
The row count MUST start at 1 or else the behavior seems undefined; i.e., when I start from 0 some
rows might be returned two or more times or not at all.
----
Server IP: 64.71.164.2
Probable Submitter: 12.177.9.218
----
Manual Page -- http://www.php.net/manual/en/function.odbc-fetch-array.php
Edit -- https://master.php.net/note/edit/76627
Del: integrated -- https://master.php.net/note/delete/76627/integrated
Del: useless -- https://master.php.net/note/delete/76627/useless
Del: bad code -- https://master.php.net/note/delete/76627/bad+code
Del: spam -- https://master.php.net/note/delete/76627/spam
Del: non-english -- https://master.php.net/note/delete/76627/non-english
Del: in docs -- https://master.php.net/note/delete/76627/in+docs
Del: other reasons-- https://master.php.net/note/delete/76627
Reject -- https://master.php.net/note/reject/76627
Search -- https://master.php.net/manage/user-notes.php