I need to move the displayed informations (echo from a "select querry") to an other table (a similar one - archive).
who can help me ?
Thanks a lot,
Erick.
How can I move data (a row) from table A to table B?
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Thanks for your answer.
I guess I'm not good enough for that kind of stunt! .... I tried, and I get a "Supplied argument is not a valid MySQL result resource".
Could you please supply a more specific exemple?
I need to move let say: user_id, date1, date2, F1, F2 from table_A to table_B - the data in table_A must be deleted after moving to table_B
and of course the 2 tables structure are similar.
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Thanks for you proposition. I guess I get it worked now. I first SELECT*, then INSERT INTO table_B and then DELETE FROM table_A.twigletmac wrote:Could you post the code you tried so we can help you debug it?
Mac
It works, even if this not the "right method" to do it !
I still have a small problem... It doesn't want to move the "SPACE" sign. that means, if I have : test tes1, it will move only : test.
Any idea?
Thanks,
Erick.
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK