SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jan 2005
    Location
    France
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Connecting to two databases

    Hi,

    I have two databases (db1 and db2). In each one there is a table for the users ID (uid, uid). If a new user arrive, I have to check the both tables (in each database) to see if this UID exists before.
    How can I establish a like connection and check in one code ?
    I wish you have an example

    Thanks
    Last edited by abd73fr; Jan 7, 2005 at 03:50.

  2. #2
    SitePoint Wizard Mike Borozdin's Avatar
    Join Date
    Oct 2002
    Location
    Edinburgh, UK
    Posts
    1,743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    $db1 mysql_connect($host$user$password);
    $db2 mysql_connect($host$user$password);
    mysql_select_db($dbName1$db1);
    mysql_select_db($dbName2$db2); 


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •