Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Database: How to import data from another table ?
Mupetz
New
Hey guys,
Migrated from vBulletin4. This is table: gdn_user, column: Photo related.
I would like to import generated data from another table/column into gdn_user's Photo column.
Tried this: pastebin.com/pbvD23AB
But it fills the Photo column after the last user id
So, I have 5000 members, generated 5000 image paths. When filling with above command, it fills from 5001 to 10000.. grr
I would like to fill into existing ids.. from 1 to 5000
I'm sure there are some mysql gurus arouns here
Please, I would really appreciate a hand.
Thank you so much
0
Best Answer
-
Todd Vanilla Staff
You want to use an update command:
update gdn_user u join `separate_table` u2 on u.UserID = u2.userid set u.Photo = u2.`separate_column`;
1
Answers
You want to use an update command:
Brilliant! Thanks a million Todd