Combine data from multiple databases

Discussion in 'MySQL' started by Rahul Bose, Jul 20, 2010.

  1. #1
    Hey All,

    I hope I can explain this well. The company finally took the plunge and we are going centralized with our database. Currently each server has a db and then has the same table on each server. The database is question has a table named users. Here is the create table syntax:

    Here in lies the problem: these tables were supposed to be kept the same but I know they are not. Also, if a user's password changed, it might have only been changed in one table, etc. Yes, completely ugly.

    Anywho, my question is, what is the best way I can go about trying to get the best and most complete results from these three tables into one. I have already told the higher ups there will be some problems but now I just want a way to merge that will cause the least problems.
     
    Rahul Bose, Jul 20, 2010 IP
  2. ASPMachine

    ASPMachine Peon

    Messages:
    723
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you're trying to change the user's Password at all the tables, this can be. You just need to create three database connection whether with single connection string or three totally separate database connection string.

    Yes, displaying combine result from multiple database is quite hard if you wish to use option like Go Next>> page1, page2, page3 etc.

    If records are limited at each database, you can display it together.
     
    ASPMachine, Jul 20, 2010 IP