Prepared Statements With Multiple Databases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I need my Prepared Statement database connection to be able to connect with two different databases (which use the same username / password).

They are assigned variables

$database1 and $database2

What I have been using so far is:


$dsh = 'mysql:host=localhost;dbname='. $database1; 
$dbh = new PDO($dsh, $username, $password); 


Is there a way to amend this with a second database connection?

Ron



www.TheVerseOfTheDay.info 

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux