Re: Nested queries don't work

From: Date: Wed, 15 Oct 2003 20:06:00 +0000
Subject: Re: Nested queries don't work
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-166250@lists.php.net to get a copy of this message
I would guess you have to use some extra layer of connection pools... each of those queries should go in a separate sql connection... i believe... On Wed, 2003-10-15 at 15:36, Rich Fox wrote: > I have the following code querying MS SQL Server > > $query = "SELECT * FROM mytable"; > $res = mssql_query($query); > $nr = mssql_num_rows($res); > for ($i=0; $i<$nr; $i++) > { > $a = mssql_fetch_array($res); > $query = "SELECT * FROM anothertable WHERE id=".$a['anotherID']; > $res1 = mssql_query($query); > $anr = mssql_num_rows($res1); > ... > }

« previous php.general (#166250) next »