You are here: Re: [PHP] Connecting To Multiple MySQL Databases « PHP « IT news, forums, messages
Re: [PHP] Connecting To Multiple MySQL Databases

Posted by Tony Di Croce on 02/05/05 21:28

OK... Here's a slightly different, but related question...

Can database connection resources be serialiazed and re-used in a
different script invocation? For example, can I open a DB connection,
assign it to a $_SESSION[] variable and then later use it on a
different page? Somehow, I doubt it...


On Sat, 5 Feb 2005 11:34:01 -0600, NathanielGuy#21 <blacknute@gmail.com> wrote:
> Worked like a charm, thanks!
> --nathan
>
>
> On Thu, 03 Feb 2005 20:33:17 -0700, Dan Trainor <info@hostinthebox.net> wrote:
> > NathanielGuy#21 wrote:
> > > I know this may be slightly off topic for a PHP listserv but I cant
> > > find my answer anywhere else. I start off generating a page connected
> > > to one database as a certain user and I call a script that requires a
> > > connection to a second database as a different user. Is there any way
> > > I could open that connection while maintaining the current one aswell?
> > > The connection of the script is opend and closed before any more of
> > > the other page is generated. Im not sure how to go about solving this
> > > problem other than rewriting my script. Any ideas?
> > >
> > > --nathan
> > >
> >
> > I'm a bit new myself, but why not call the resources seperate names?
> >
> > $sql1 = mysql_connect($host1, $user1, $pass1);
> >
> > $sql2 = mysql_connect($host2, $user2, $pass2);
> >
> > Hope that helps
> > -dant
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> http://www.blacknute.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
Send REAL USPS letters from the Web!
http://www.quickymail.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация