first, it returns all the results at once ... to do otherwise, you'd have
to use CURSORS, which I don't believe PHP supports at this time ...
but, am curious as to why the multiple loops requirement?
On Fri, 2 Mar 2001, dime wrote:
> I have been wondering this for a while and finally have the chance to ask. What I'm
>trying to do is select a bunch of names from one table in a postgresql database. The
>way I'd like to display them is alphabetically and indexed by the first letter. So
>they look similar to this:
>
> A
> Alexandria, Mark
> Angel, Chris
> B
> Boy, John
> C
> ....
>
> I know a couple ways to do it, but every way involves multiple queries. What I'm
>wondering is when I issue a select statement to the database via pg_exec(), is the
>result loaded into memory then, or when each successive pg_fetch_array() is called?
>I mean, it seems like if each pg_fetch_array were making a call to the database, that
>would be an unnecassary overhead on a list that has a lot of names. But however, if
>the entire result set is in the webserver's memory, then I don't really have a
>problem with doing multiple loops through the data. Hopefully I've described my
>problem adequately. If any one can help, or has a better idea, please let me know.
>
> Thank You.
>
> dime
>
>
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: [EMAIL PROTECTED] secondary: scrappy@{freebsd|postgresql}.org
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]