RE: [PHP] Persistent connection & many scripts ?

From: Date: Wed, 18 Apr 2001 14:07:20 +0000
Subject: RE: [PHP] Persistent connection & many scripts ?
Groups: php.general 
Request: Send a blank email to php-general+get-49218@lists.php.net to get a copy of this message
So : <?php $conn = pg_pConnect("dbname=foo"); $res = pg_Exec($conn, "SELECT * FROM BAR"); $conn = pg_pConnect("dbname=foo"); // Here PHP/database will automagically find a persistent connection and reuse it ? $res = pg_Exec($conn,"SELECT * FROM XYZ"); ?> Is it what you mean ? PS : I understand that my code here is not very usefull ;-) > -----Message d'origine----- > De: Plutarck [SMTP:aemuli@spamclause-yahoo.com] > Date: mercredi 18 avril 2001 15:57 > À: php-general@lists.php.net > Objet: Re: [PHP] Persistent connection & many scripts ? > > Nope, you don't need to save the ID. PHP/database does the work of > remembering what the ID of your persistant connection is. > > > -- > Plutarck > Should be working on something... > ...but forgot what it was. > > > ""Picard, Cyril"" <cyril.picard@eads-dsn.com> wrote in message > >news:B5CDCF382265D311BF33009027A8FE9401E6F3C1@pmrmsg.edsn.com... > hummm... I don't know how to use pg_pconnect()... It returns a connection > ID, isn't it ? And I have to use this connection ID later ? > I would like to reuse this connection ID to another script... and the > problem is here :( > > I feel that I ignore something so important that I'm stopped and so > trivial > that you do not think about it ! > > > -----Message d'origine----- > > De: Christian Reiniger [SMTP:creinig@mayn.de] > > Date: mercredi 18 avril 2001 13:40 > > À: php-general@lists.php.net > > Objet: Re: [PHP] Persistent connection & many scripts ? > > > > On Tuesday 17 April 2001 16:28, you wrote: > > > Yes... I'm not familiar with sessions. This should be like this ? : > > > > > > In connect.php : > > > <?php > > > session_start(); > > > $connect = pg_pConnect("blablabla"); > > > session_register("connect"); > > > <A HREF="query.php?<?=SID"?>clique ici</?> > > > ?> > > > > Simply using pg_pconnect() (without saving the connection ID) should be > > just as fast and more failproof > > > > -- > > Christian Reiniger > > LGDC Webmaster (http://sunsite.dk/lgdc/) > > > > AAAAA - American Association Against Acronym Abuse > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#49218) next »