Re: [PDO] Question on Persistent PDO Connections
[email protected] (Lukas Kahwe Smith) Wed, 4 Nov 2009 16:31:52 +0100
| Newsgroups | php.pdo |
|---|---|
| Message-ID | <[email protected]> |
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" <[email protected]> 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 >