Re: Multiple Database Connection Using Prepard Statements
| From: | Peter Lind | Date: | Sat, 19 May 2012 18:49:20 +0000 |
| Subject: | Re: Multiple Database Connection Using Prepard Statements | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-48287@lists.php.net to get a copy of this message | ||
On 19 May 2012 20:36, Ron Piggott <ron.piggott@actsministries.org> 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>