| | |
How to connect to two databases at the same time
Please support our MySQL advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Hello Guys I want to connect two databases at the same time but it looks like the php is only picking up the second database.
One database is on my localhost and the other one is on server, I want to transfer the data from my localhost database to the database on the server. I have also tried passing the 4th argument to the mysql_connect function but I can't get it to work.
mysql_connect("localhost", "name", "password", true);
Please help me.
Thanks
One database is on my localhost and the other one is on server, I want to transfer the data from my localhost database to the database on the server. I have also tried passing the 4th argument to the mysql_connect function but I can't get it to work.
mysql_connect("localhost", "name", "password", true);
Please help me.
Thanks
If you think we fight for money and you fight for honor, then remember everyone fights for the thing they don't have...
What language are you using?
WolfWorkz Studios - Server Development
WolfWorkz.com
Pirates Registration
My Personal Blog
SideBySideGeek.com - My Newest Project
WolfWorkz.com
Pirates Registration
My Personal Blog
SideBySideGeek.com - My Newest Project
http://in.php.net/mysql_select_db Read the comments, especially of buzz at oska dot com
Ignorance is definitely not bliss!
*PM asking for help will be ignored*
*PM asking for help will be ignored*
•
•
•
•
Hello Guys I want to connect two databases at the same time but it looks like the php is only picking up the second database.
One database is on my localhost and the other one is on server, I want to transfer the data from my localhost database to the database on the server. I have also tried passing the 4th argument to the mysql_connect function but I can't get it to work.
mysql_connect("localhost", "name", "password", true);
Please help me.
Thanks
php Syntax (Toggle Plain Text)
$link=mysql_connect("localhost", "name", "password", true); $link1=mysql_connect("localhost", "name", "password", true); $mysql_query($qry,$link); $mysql_query($qry1,$link1);
Last edited by peter_budo; Jul 24th, 2009 at 3:03 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Abhishek Joshi
IT-Analyst
IT-Analyst
![]() |
Similar Threads
- Custom Database Admin Tool. (PHP)
- Connecting C++ to MS-Access (C++)
- i`m lost!!! (PHP)
- Hardware Interrupts & 100% CPU usage (Windows NT / 2000 / XP)
- Can't connect database or view PHP pages in Dreamweaver (PHP)
- database connectivity in c++ (C++)
- Multi-user program issues (VB.NET)
- 35 processes, need to trim the fat (Viruses, Spyware and other Nasties)
Other Threads in the MySQL Forum
- Previous Thread: How to install MY SQL J/Connector
- Next Thread: Mysql "WITH" and union
| Thread Tools | Search this Thread |
agplv3 alfresco amazon api artisticlicense aws bizspark breathalyzer camparingtocolumns cmg communityjournalism contentmanagement contractors copyright count court crm database design developer development distinct drupal dui ec2 email enterprise eudora facebook form foss gartner gnu government gpl greenit groklaw hiring hyperic images innerjoins insert ip joebrockmeier join journalism keyword keywords kickfire law legal license licensing linux maintenance managing mariadb matchingcolumns metron micromanage microsoft microsoftexchange mindtouch montywidenius mozilla multiple music mysql mysqlcolumnupdating mysqldatetimeordermax() mysqlindex mysqlinternalqueries mysqlquery mysqlsearch news open-xchange opendatabasealliance opengovernment opensource oracle penelope php priceupdating query referencedesign reorderingcolumns resultset saas select sharepoint simpledb sourcecode spotify sql sugarcrm syntax techsupport thunderbird transparency virtualization






