Jump to content

transfer mysql data to another table?


tjhilder

Recommended Posts

Hi,

 

say you have a table called news and then a table called archives, and you want to transfer the data from news to archives, is this possible? I want to be able to transfer it by ticking the news you want transfered then clicking a button (i get all that fine) just wondering how i would go about transfering it, is it possible?

 

thanks in advance.

Link to comment
Share on other sites

[!--quoteo(post=333662:date=Jan 5 2006, 04:05 PM:name=fenway)--][div class=\'quotetop\']QUOTE(fenway @ Jan 5 2006, 04:05 PM) 333662[/snapback][/div][div class=\'quotemain\'][!--quotec--]

Alternatively, "INSERT INTO archives SELECT * FROM news", and then "DELETE * FROM archives WHERE uid=(SELECT MAX(uid) FROM archives)".

 

Why delete archived news :)

 

I thought the basic ideas was to insert old news into archives and delete them from the news table

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.