socalnate Posted July 9, 2007 Share Posted July 9, 2007 I want to replace all Unique ID's on one table (a) with all the unique ID's from table (b) where the columns "game_name" match. I figured this is possible because all of the game_names on both tables are unique. Seems very simple but I can't figure out of the life of me how to do this...any ideas? ??? Quote Link to comment https://forums.phpfreaks.com/topic/59018-replace-id-from-one-table-with-another-where-the-two-have/ Share on other sites More sharing options...
AndyB Posted July 9, 2007 Share Posted July 9, 2007 This sounds like the recipe for a total database meltdown. I can't imagine what the database structure is like, but why/how do you have replaceable unique ids; why do you have game_name stored in two different tables? You might want to read something simple on database normalization as well as how record ids are the key to the relational aspects of an RDBMS Quote Link to comment https://forums.phpfreaks.com/topic/59018-replace-id-from-one-table-with-another-where-the-two-have/#findComment-292962 Share on other sites More sharing options...
socalnate Posted July 9, 2007 Author Share Posted July 9, 2007 Yeah I know...the problem I have is that a lot of info is grabbed from multiple websites so the only way to "unify" the data is to use a unique identifier other than an id so I can link the data across the tables. It's worked so far using "UNIQUE" where in my names column where I know the names are unique. I've also used LEFT joins with great success...but I would seriously like to copy all my ids from each table to the next. Quote Link to comment https://forums.phpfreaks.com/topic/59018-replace-id-from-one-table-with-another-where-the-two-have/#findComment-293085 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.