Jim R Posted August 30, 2010 Share Posted August 30, 2010 Actually, I have two tables: hhr_schools (my main table) hhr_email_coaches (has email addresses I want to move into the other table) So I'm trying to merge. Through some searching, I think I need to use UPDATE, which makes sense. I don't seem to be getting the syntax right. Here is what I'm using: UPDATE 'hhr_schools', 'hhr_email_coaches' SET 'hhr_schools'.'email'='hhr_email_coaches'.'email' WHERE 'hhr_schools'.'school'='hhr_email_coaches'.'school'; Quote Link to comment https://forums.phpfreaks.com/topic/212077-trying-to-update-table-a-with-information-from-table-b/ Share on other sites More sharing options...
fenway Posted August 30, 2010 Share Posted August 30, 2010 Drop all of those quotes. Quote Link to comment https://forums.phpfreaks.com/topic/212077-trying-to-update-table-a-with-information-from-table-b/#findComment-1105233 Share on other sites More sharing options...
Jim R Posted August 30, 2010 Author Share Posted August 30, 2010 Very cool! Thanks it worked. You guys are making me look pretty smart over here. : ) Quote Link to comment https://forums.phpfreaks.com/topic/212077-trying-to-update-table-a-with-information-from-table-b/#findComment-1105236 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.