ConFoo Montreal 2026: Call for Papers

Voting

: three minus one?
(Example: nine)

The Note You're Voting On

luke at croslow dot com
18 years ago
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.

<< Back to user notes page

To Top