Hi
You dont say which db you are using, but I assume MYSQL
This may work -
When you log onto the second database it must be a different user (not all
root for example)
make sure you capture the database handle in two different variables
something like
$db1=mysql_connect($blah1,$blah2,$blah3);
$db2=mysql_connect($blah4,$blah5,$blah6);
would be close
HTH
-----Original Message-----
From: Jason Lotito [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 04, 2001 1:06 AM
To: Plutarck; [EMAIL PROTECTED]
Subject: RE: [PHP] query 2 databases from one script
> "Michael Roark" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I've a script has many functions in it all of which hit databaseA . I've
> > added a new function which is to get data from databaseB how can I go
> about
> > this in one script when I try to connect to a database other
> than the one
> > defined at the beginning of the script all the functions in the script
> > break as if I am setting the wrong database at the top of the
> script. Any
> > help would be greatly appreciated.
> >
> > Michael Roark
I know this is not the direction you wanted to go, however, I have an
important question. Why would you need 2 databases? What is the stucture,
what are you trying to accomplish with the script, and why the need for 2
databases?
This sounds more like poor database design, and if solved, would avoid such
problems.
Jason Lotito
www.NewbieNetwork.net
Where those who can, teach;
and those who can, learn.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]