ID:               16777
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Closed
 Bug Type:         ODBC related
 Operating System: win 2000
 PHP Version:      4.2.0
 New Comment:

please try a snapshot, or wait until 4.2.1


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

[2002-05-02 12:23:00] [EMAIL PROTECTED]

I am having this problem as well.  The cursor seems to be using the
default "forward-only" mode.  I assume PHP 4.1 automatically generated
a static cursor and 4.2 is not?

Any ideas?  This totally screws up the web application I'm working on.

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

[2002-05-01 08:41:06] [EMAIL PROTECTED]

I believe this is fixed in CVS.  Please try one of the latest CVS
snapshots, and see if it solves the problem for you.  If not, reopen
the bug... 

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

[2002-04-30 10:56:23] [EMAIL PROTECTED]

OK, simple version:
$var = odbc_exec($cnx,Some query);
$row = 0;
while (odbc_fetch_row($var)){
     $row++;
     $res1 = odbc_fetch_row($var, 1 );
     $res2 = odbc_fetch_row($var, 2 );

          $var2 = odbc_exec($cnx,Select * from some table 
             where field = $res1);
             while (odbc_fetch_row($var2)){
             $row++;
             $res3 = odbc_fetch_row($var2, 1 );
             $res4 = odbc_fetch_row($var2, 2 );
        }
}

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

[2002-04-30 03:59:05] [EMAIL PROTECTED]

a simplified example would be :

$res=odbc_exec($conn,"select * from categorii order by
ordine_categorie");
for($i=1;odbc_fetch_row($res);$i++)
        {
        $res2=odbc_exec($conn,"select * from subcategorii where
id_categorie=$idcateg order by ordine_subcategorie");
        ......
      }

the second query fails but ONLY when the first return more than one
row. i tried with different connections but doesn't work.

check my original post at
http://news.php.net/article.php?group=php.db&article=18880

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

[2002-04-24 18:48:52] [EMAIL PROTECTED]

Can you please provide a simplified test case that doesn't work for
you?

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/16777

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

Reply via email to