note 92242 added to function.odbc-fetch-array
| From: | dfordinal at hotmail dot com | Date: | Wed, 15 Jul 2009 15:18:37 +0000 |
| Subject: | note 92242 added to function.odbc-fetch-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-158341@lists.php.net to get a copy of this message | ||
I have found a problem with my use of odbc_fetch_array. When I use this method with the second
paramater (see odbc_fetch_array($resultset, $rowNum) below). I get data corruption after the 32,767
row. We have one table with 95,000 rows and this was a test. The record in this row replaces every
other row of those remaining in the result set. So if the data in that row has the $number 32767,
$name Ohio State, etc then that record will overwrite the 32769, 32771 records and every other one
after that. Take the following code:
$rowNum = $rowsToFetch - $rowsPerPage + 1;
while ($row = odbc_fetch_array($resultset, $rowNum)){
displayRowAssoc($row);
$rowNum++;
}
$number = $row['NUM'];
$name = $row['NAME'];
$address = $row['ADDRESS'];
$type = $row['TYPE'];
$ctrl = $row['CTRL'];
$chgdate = $row['MODDTE'];
$cash = $row['CASHCODE'];
<td>$number</td>
<td>$name</td>
<td>$address</td>
<td>$type</td>
<td>$ctrl</td>
<td>$chgdate</td>
<td>$cash</td>
Does anyone have any ideas of how to get around this?
----
Server IP: 64.71.164.2
Probable Submitter: 192.146.112.8
----
Manual Page -- http://www.php.net/manual/en/function.odbc-fetch-array.php
Edit -- https://master.php.net/note/edit/92242
Del: integrated -- https://master.php.net/note/delete/92242/integrated
Del: useless -- https://master.php.net/note/delete/92242/useless
Del: bad code -- https://master.php.net/note/delete/92242/bad+code
Del: spam -- https://master.php.net/note/delete/92242/spam
Del: non-english -- https://master.php.net/note/delete/92242/non-english
Del: in docs -- https://master.php.net/note/delete/92242/in+docs
Del: other reasons-- https://master.php.net/note/delete/92242
Reject -- https://master.php.net/note/reject/92242
Search -- https://master.php.net/manage/user-notes.php