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
https://forums.phpfreaks.com/topic/3152-transfer-mysql-data-to-another-table/
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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.