PDA

View Full Version : Copy daba from column to another under MySQL



BrainDamage
09-05-2004, 07:54 PM
I need a MySQL request to copy this data :

From table : e107_user
To table : ibf_members

Copy column = user_id
to column = id

Where

colum user_name in table e107_user = colum name in table ibf_members

Thanx

BrainDamage
09-06-2004, 08:35 AM
It's okey I've found a way

Patrick
09-06-2004, 10:42 AM
Didn't even give me a chance to answer ;)

BrainDamage
09-06-2004, 07:02 PM
There was a problem with the e107 integration to IBF !

The script copies accounts but not their IDs so a user has a different ID on e107 than the one on IBF. Users were getting problems opening their settings control panel from e107 login menu and were redirected into other members profiles !

So I made this SQL request :


UPDATE e107_user SET e107_user.user_id = ibf_members.id WHERE e107_user.user_name = ibf_members.name

I had the following error : Unknown table "ibf_members"

The solution was to do the request this way :


UPDATE ibf_members, e107_user SET e107_user.user_id = ibf_members.id WHERE e107_user.user_name = ibf_members.name

I suggest you copy this into e107-IBF integration forum in case somebody has the same problem as I did ! :D

Patrick
09-06-2004, 08:22 PM
The redirection, login, ect.. are all username based though. The script doesn't focus at all on user ids, it is username based (this is the third or fourth integration I have done, I learned by the second that it was easier to just base it off of usernames).

I don't understand where you were having problems?

BrainDamage
09-11-2004, 04:45 AM
When a user was clicking on his "Profile" from e107, he was redirected using a different ID...

Let's say member "Smith" clicks "profile" from e107 login menu... when he get's redirected into invision profile, he's seing member "Gabrielle" !

if users have different ID's in e107 and IBF the profile redirection is done wrong, and I prefer to keep the both databases synchro,ized with same ID's... Just to have it clean and nice :D