pg_pconnect

From: Date: Sun, 27 Aug 2000 20:29:24 +0000
Subject: pg_pconnect
Groups: php.general 
Request: Send a blank email to php-general+get-17628@lists.php.net to get a copy of this message
Back in PHP 3 I was using pg_pconnect everywhere I needed to make a connection to the DB. My understanding at the time was that pg_pconnect would speed up the connection, using the previous one each time. It worked fine. I could reload the page that made the call multiple times (like displaying some items in the database) and it would come up every time. Now in version 4 when I use pg_pconnect maybe once in about 5-10 tries it comes back saying it couldn't connect (or specifically that the return value was not a valid result code). Reload it again and it works. Reload it agian and it doesn't, and so forth. I switched back to just using pg_connect and everything is working fine. So I guess what I'm asking is what exactly is the difference. Why did it work in version 3 (is something different now?). When should you use persistent connections and what advantage do they give you? I'm a C programmer, not a db guru! :) dime

« previous php.general (#17628) next »