![]() |
((( Two Simultaneous Database Connections )))
I am trying to access two databases on the same php page - one that I created, and the other being the vBulletin database.
Code:
// On Server Development It's not working and there seems to be some mechanism preventing it from working. Why can I not have two simultaneous connections? Is there some prohibition against having two simultaneous database connections with MYSQL? If you require additional information, please let me know. Thank you, Jack |
MySQL returns the same connection ID if you connect to two databases at once. So if you do need to connect to two databases, you need to do so before each query.
In your case, $user_con will be the same as the $cust_con connection ID. You can also avoid this by passing the 4th connect parameter to the second connection like this... Code:
$cust_con = mysql_connect($host,$user,$pass,true) or die(mysql_error()); |
That is great; I will try it :)
Thank you for your time! Jack |
All times are GMT. The time now is 08:24 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|