|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5719 lost result entry when using sybase_fetch_row()
Submitted: 2000-07-21 10:42 UTC Modified: 2000-09-08 06:57 UTC
From: torsten dot weigel at dresdner-bank dot com Assigned:
Status: Closed Package: Sybase (dblib) related
PHP Version: 4.0 Release Candidate 2 OS: Solaris 2.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: torsten dot weigel at dresdner-bank dot com
New email:
PHP Version: OS:


 [2000-07-21 10:42 UTC] torsten dot weigel at dresdner-bank dot com
system decription:
- SUN E450 4xUltraSparc II 250 MHz, 1GB memory
- Solaris 2.6 (all recomended patches)
- Sybase Adaptive Server Enterprise/11.9.2/1031/P/Sun_svr4/OS   5.5.1/FBO/Fri Aug 14 06:26:45 1998

php configuration line:

./configure \
  --with-apxs=/opt/apache/bin/apxs \
  --with-config-file-path=/opt/apache/conf \
  --with-mm=../../mm-1.1.2/mm-binary \
  --without-mysql \
  --with-sybase=/opt/db/sybase/sybase11.9.2 \
  --with-pdflib=/usr/local/lib \
  --with-gd=../addons/gd-1.8.3 \
  --with-jpeg-dir=/usr/local \
  --with-xpm-dir=/usr/local \
  --with-ttf=/usr/local \
  --with-mhash=/usr/local \
  --enable-libgcc \
  --enable-track-vars \

sample script:

     $db_id=sybase_connect("DSCOMPONENTS_DEV", "", "");
     if(!$db_id) {
       print ("Connect to database fails<BR>");
     } else {
       print ("Connection established<BR>");
       $db_result=sybase_query("select * from sysusers order by name");
       print ("Selected Rows= $selected_rows<BR>");
       /*Funny stuff !! Activate the next line and fix the problem*/
       while ($db_row = sybase_fetch_row($db_result)) {
         print (implode($db_row, " : "));
         print ("<BR>");

The sample script loses usually the second result line. If the error does not turn up in the first time, make a reload for the same page an then you got it. It is not relevant how to order the result, everytime the second line is empty.
The line with the sybase_data_seek-statement fixes the problem.



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-24 23:07 UTC]
Please verify, that it?s still happening using the latest version of PHP (release 4.0.1pl2 or CVS).
 [2000-07-25 11:05 UTC] torsten dot weigel at dresdner-bank dot com
Additional Information:
The reported problem occures in PHP 4.0 pl2.
 [2000-09-04 20:30 UTC]
Does this problem still exist with php4.0.2 ?

 [2000-09-08 06:56 UTC] torsten dot weigel at dresdner-bank dot com
The problem is fixed in new release php 4.0.2.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 17 12:02:41 2024 UTC