The simplest way would be to create two separate database handles, IE. $dbh1 amd $dbh2 
when connecting. Assuming both databases are on the same machine.


Mike<mickalo>Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Web Hosting
http://www.justlightening.net
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
----- Original Message ----- 
From: "Ramprasad A Padmanabhan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 26, 2003 8:51 AM
Subject: selectdb in DBI


> quick question
> 
>    In my script  I need to connect to two  different databases How Can I 
> do this
> 
>   $dbh = DBI->connect( "DBI:mysql:database=$DBNAME1;host=$DBHOST","", "" 
> )  or die "Can't connect to Mysql database: $DBI::errstr\n";
> 
> .......
> .......
> .......
> 
> # Now change the database
> $dbh->selectdb($DBNAME2)   # This function doesnot  exist
> 
> 
> Do I need to connect to mysql again inorder to select a different database
> 
> Thanks
> Ram
> 
> 
> 
> 
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to