Why not just JOIN the tables using new columns in the sportDB? For instance,
if your user names in the sportDB database and the user names in the mysql
database match up, just do a JOIN ... ON sportdb.table_name.username_field =
mysql.user.User

You don't need two connections.

Jonathan

-----Original Message-----
From: Russ Michell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 11:34 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Querying 2 databases...???


Hi all:

I want to be able to update,insert and delete identical information in 2
tables that lie in 
seperate Databases from my PHPfront-end. 

The info I am editing is username/access info for table data 
privileges. One table called 'users' is in my own DB: 'sportDB' and the 
other is the 'user' table in the 'mysql' database.

I'm not sure how to construct the queries and wether or not I need to set up
a 
separate php-$connection setup (running 2: one to connect to my own 
datatase: 'sportDB' and the other to connect to: 'mysql')

I suppose I could include new columns in the 'mysql' database to 
incorporate the data I'm trying to extract from my 'users' table within
'sportDB', but I'm not sure what effect this may have on the other 
applications (not mine) that rely on this MySQL installation.

Does anyone have any views on this problem or has anyone any 
whole/partial solutions to point me in the right direction??

I am using php4.0.3pl1 with MySQL3.22.32 on RH6.1

Any help would be very much appreciated.
Kind regards:

Russ Michell (APU Webteam)

#-------------------------------------------------------#
                                
         "Believe nothing - consider everything"        
           "Web Developers do it on-the-fly."
                                                        
  Russ Michell
  Anglia Polytechnic University Webteam
  
  e: [EMAIL PROTECTED]
  w: www.apu.ac.uk/webteam
  t: +44 (0)1223 363271 x 2331

  www.theruss.com
                        
#-------------------------------------------------------#


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to