MySQL Forums
Forum List  »  Newbie

Copying Values on Change?
Posted by: Jonas Præstegaard
Date: March 10, 2015 05:45AM

Okay, so here is the deal:

I have one database with two tables.
We have table A where all my userinformation is stored.
And we have table B where I have some additional information.

Whenever a user registers on my server, their information gets stored in table A.
But I need one piece of information (unique to every user) from table A, to be stored at a specific place in table B.

Example:

Table A: id=5 name=Jones unique=ST9465 << This is my userinformation
Table B: id=? unique=? << Here I want the ID and Unique from Table A to be stored here as well.

How would I do it?

The result should be as follows:

Table A: id=5 name=Jones unique=ST9465
Table B: id=5 unique=ST9465

I think you get the idea. The problem here is how to make Table B "steal" the info from Table A?

And no, I cannot write the information as they register. The system doesn't work that way. The "stealing" has to be done after the user has been registered.

Any help is appreciated :D

- Jones

Options: ReplyQuote


Subject
Written By
Posted
Copying Values on Change?
March 10, 2015 05:45AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.