★ wanayoo — archive 1999 http://www.devshed.com/Talk/Forums/Forum4/HTML/000369.htmlNouvelle recherche | Portail wanayoo
DevShed Menu
* DevShed Home
* Developer News
* DevShed Brain Dump




UBBFriend: Email This Page to Someone!
  DevShed Discussion Forums
  MySQL
  query using two databases.

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   query using two databases.
VidJa
Junior Member
posted April 19, 2000 07:43 AM     Click Here to See the Profile for VidJa   Click Here to Email VidJa     Edit/Delete Message Reply w/Quote
I would like to connect to two different mysql databases on two different machines and run a query using tables from these two different DB's.
Is that possible directly or should I store a query on DB1 first as a temp table in DB2 and then run a query against a table in DB2 and the temp. table?
I use PHP4 and Apache 1.3.12.

I hope someone can help me on the way.

VidJa

rod k
Member
posted April 19, 2000 10:24 AM     Click Here to See the Profile for rod k   Click Here to Email rod k     Edit/Delete Message Reply w/Quote
You can join tables in different databases on the same machine but not on different machines. You'll need two seperate queries.

VidJa
Junior Member
posted April 19, 2000 04:02 PM     Click Here to See the Profile for VidJa   Click Here to Email VidJa     Edit/Delete Message Reply w/Quote
and how can I do that, I'm pretty new to PHP, MySQL and SQL in particular.

rod k
Member
posted April 20, 2000 09:11 AM     Click Here to See the Profile for rod k   Click Here to Email rod k     Edit/Delete Message Reply w/Quote
Well, that really depends on what you are trying to do. What information in the first database affects what you are trying to do in the second and how, etc.

All times are MST (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | DevShed.com

Copyright © 1997-2000 ngenuity. All rights reserved.

Powered by: Ultimate Bulletin Board, Version 5.41a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 1999.