OZONE Asylum
Forums
Server-Side Scripting - Oh my!
Mysql multiple connections pointers
This page's ID:
27958
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
In looking around for a proper answer to your problem I've learned something that might be the solution to your problem and certainly deals with a problem I was having and didn't know why. As I said in my previous post I deal with a setup at work that has me sometimes accessing 2 - 4 different databases in the same script. I was having the same problem you were, the connections actually seemed to be getting confused. There were times that I would try and close a connection and I would get an error message that the connection identifier didn't exist even though I knew I had opened it and run queries with it. This caused me to rewite a lot of code so that I explicitly open each connection when I need it and close it as soon as I'm done with it so there was no problem. I now see that PHP seems to have a problem with multiple connections opened with the same HOST, USER, PASS parameters. PHP only keeps one open connection to any database server so as soon as you open the second one the first becomes invalid. Still there is hope! As noted [url=http://us2.php.net/manual/en/function.mysql-connect.php]here[/url] as of PHP 4.2.0 a new_link parameter was added and if specified will force a second connection to be opened to the same host. I hope this helps. - Butcher -
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »
Maximum Security
OZONE
DHTML/Javascript
Server-Side Scripting - Oh my!
CSS - DOM - XHTML - XML - XSL - XSLT
Stupid Basic HTML
Visual Therapy
Photoshop
Photoshop Pong, Anyone?
***WARNING*** BIG SIG APPROACHING
Photography
3D Modelling & Rendering
Multimedia/Animation
Print Graphics
Holding Pens
Philosophy and other Silliness
Outpatient Counseling
Site reviews!
Mad Scientists' Laboratory
Getting to know the Grail