ID:               27557
 Updated by:       [EMAIL PROTECTED]
 Reported By:      admin at db-hq dot net
-Status:           Feedback
+Status:           No Feedback
 Bug Type:         ODBC related
 Operating System: Linux - Fedora Core 1
 PHP Version:      4.3.4
 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.




Previous Comments:
------------------------------------------------------------------------

[2004-03-11 09:19:18] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip



------------------------------------------------------------------------

[2004-03-10 19:16:38] admin at db-hq dot net

Description:
------------
I am working on porting phpbb over to DB2, and ran into an error with
odbc_fetch_row. When the following SQL is executed:



�SELECT * FROM phpbb_fourms WHERE forum_id = 1�



odbc_fetch_row($result_id, $i) returns false. Where i = 1.



Sending the query to the database returns one row. When I remove the $i
from odbc_fetch_row it works perfectly. Also if more than one result is
returned there is no problem. Also it seems to only occur when there is
a select * or when there is a large number of columns returning a
single row. 



I am pretty sure I have experienced this bug since the early 4.0.*
days.



Reproduce code:
---------------
$i =  1;

$k = 0;

                    

while(odbc_fetch_row($result_id, $i) && $k <
$this->result_numrows[$result_id]){



for($j = 1; $j < count($this->result_field_names[$result_id])+1;
$j++){



$this->result_rowset[$result_id][$k][$this->result_field_names[$result_id][$j-1]]
= odbc_result($result_id, $j);



}

$i++;

$k++;

}

Expected result:
----------------
Expected odbc_fetch_row($result_id, $i) to return true.

Actual result:
--------------
odbc_fetch_row($result_id, $i) returned false if just one row was
selected from the database. If more than one row was selected it
returned true and worked fine.



Removing the $i from odbc_fetch_row() fixed the problem. None the less
it is still appears a bug. I also verified that the database query does
return one result.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27557&edit=1

Reply via email to