php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57867 nested ingres_fetch_object dont work
Submitted: 2007-10-08 01:04 UTC Modified: 2007-11-12 06:30 UTC
From: V dot Bulov at VAZ dot ru Assigned:
Status: Closed Package: ingres (PECL)
PHP Version: 5.2.1 OS: Linux FC6
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:
Package:
Bug Type:
Summary:
From: V dot Bulov at VAZ dot ru
New email:
PHP Version: OS:

 

 [2007-10-08 01:04 UTC] V dot Bulov at VAZ dot ru
Description:
------------
I wont used  nested ingres_fetch_object but
after second ingres_fetch_object firs  ingres_fetch_object
returned false and break from loop

Reproduce code:
---------------
$link1 = ingres_connect ("kpl","kpl","kpl");                  
$link2 = ingres_connect ("kpl","kpl","kpl");                  
$S1 = ingres_query ( "select * from table1 " ,$link1);
while (  $R1 = ingres_fetch_object(INGRES_ASSOC,link1)  ) { 
    $S2 = ingres_query ( "select * from table2 where xx = " . $R1->xx"
,$link2);
    $R2 = ingres_fetch_object(INGRES_ASSOC,link2);

}
In this case fetch only 1 records from table1.
If comments 
//  $R2 = ingres_fetch_object(INGRES_ASSOC,link2);
firs select work true.


Expected result:
----------------
select from first and second table

Actual result:
--------------
select own row from first table
and select X-rows from second table

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-11-08 12:17 UTC] grant dot croker at ingres dot com
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 [2007-11-12 06:30 UTC] grant dot croker at ingres dot com
(unable to send an email to you as it bounced)

Hi Vladimir 

I have added an example to
http://community.ingres.com/wiki/PHP_-_Nested_%28Master_Detail%29_query.
Please note that the parameter syntax for most functions has changed
with respect to the CVS release. For example:

ingres_query($sql,$link)

is now

ingres_query($link,$sql)

See http://community.ingres.com/wiki/PHP_Driver_Examples for more
example code based on the what is currently in CVS.

regards

grant
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 21:01:29 2024 UTC