Re: passing resource id's through functions
От | Frank Bax |
---|---|
Тема | Re: passing resource id's through functions |
Дата | |
Msg-id | 3.0.6.32.20020111112140.007b2470@pop6.sympatico.ca обсуждение исходный текст |
Ответ на | passing resource id's through functions (Chadwick Rolfs <cmr@shell.gis.net>) |
Ответы |
Re: passing resource id's through functions
|
Список | pgsql-php |
I never had any problems with pg_pconnect either. When I switched to pg_connect I only had isolated problems, most of the time I was able to pass it to functions, but sometime the script would die. I use the PHPLIB DB abstraction classes rather than pg_connect directly, but I don't think that's a factor here. $dbc = new DB_Example /* calls pg_connect() */ $func1($dbc); $func2($dbc); If func1 contains two calls to $dbc->query() (invokes pg_exec($dbc,..)) then func2 will fail ($dbc not a resource), otherwise func2 works properly. However, I have not yet been able to properly resolve the problem. Frank At 10:44 AM 1/11/02 -0500, Chadwick Rolfs wrote: >I seem to have figured out that pg_connect returns a resource ID that will >not pass into another function, and that pg_pconnect does. I'm not too >keen on the persistent connections. Can someone confirm this belief? I'm >trying to remember where on php.net I read how to pass pg_connect >resources to other functions, and haven't found it at functions, >persistent connections, pg_connect or pg_pconnect. > >Any help would be appreciated, and helpful :) > >Chadwick Rolfs - cmr@gis.net >Cleveland State University - Student >Music Major - The Holden Arboretum Volunteer >Computer Programmer - Student Employee >--*I finally found powdered water; >I just can't figure out what to add to it*-- > > > >---------------------------(end of broadcast)--------------------------- >TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) >
В списке pgsql-php по дате отправления: