Re: Multiple Database Connection Using Prepard Statements

Peter Lind <[email protected]>
Newsgroups gmane.comp.php.database
Message-ID <CAEU6NAeWoxWowBUUih9YR3kcNyd+9rUwhfvXWs0CbEbrE2NsPw@mail.gmail.com>
On 19 May 2012 20:36, Ron Piggott <[email protected]> wrote:
>
> How do I connect to multiple mySQL databases using Prepared Statements ?
>
> I have the syntax
>
> ===
> $dsh = 'mysql:host=localhost;dbname='.$database3;
> $dbh = new PDO($dsh, $username, $password);
> ===
>
> I want to connect to $database1 without loosing my $database3 connection
>
> Thoughts?  Comments?
>

Create a new PDO object with the connection details you need?

Regards
Peter

-- 
<hype>
WWW: plphp.dk / plind.dk
LinkedIn: plind
BeWelcome/Couchsurfing: Fake51
Twitter: kafe15
</hype>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.