|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2007-10-01 09:21 UTC] jani@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 02:00:02 2025 UTC | 
Description: ------------ Why nested ingres_fetch_object dotn work? for examle $link1 = ingres_connect (getenv("Z_NEW"),"kpl","kpl"); $link2 = ingres_connect (getenv("Z_NEW"),"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); All work true. Why? Where my mistake? Reproduce code: --------------- Why nested ingres_fetch_object dotn work? for examle $link1 = ingres_connect (getenv("Z_NEW"),"kpl","kpl"); $link2 = ingres_connect (getenv("Z_NEW"),"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); All work true. Why? Where my mistake?