Re: [PDO] Question on Persistent PDO Connections

From: Date: Wed, 04 Nov 2009 15:31:52 +0000
Subject: Re: [PDO] Question on Persistent PDO Connections
References: 1  Groups: php.pdo 
Request: Send a blank email to pdo+get-292@lists.php.net to get a copy of this message
sounds a bit fragile. why not set a session variable? also i would in any case put in some error handling routines to gracefully handle this case. also you can also create permanent temp tables. as in the contents will only be lost at a reboot but the tables are always accessible to all connections. so i am feeling you are asking the right question for the wrong approach. regards Lukas On 04.11.2009, at 15:58, "Kevin Stewart" <kstewart@vaonet.com> wrote:
Is there a way of knowing if the call to new PDO(yada) either reused a connection or created a new one? I want to create a couple of temp tables and temp triggers but don't want to have to do this everytime, only when a NEW connection is made. I suppose I could just use "IF NOT EXISTS" in the SQL, but I would rather not have to issue anything on a reuse situation. Any thoughts/help is appreciated. Kevin --PDO Working Group Mailing List (http://pdo.php.net) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.pdo (#292) next »