Jump to content

Cut data from one table and append it to another table


darksniperx

Recommended Posts

I have 2 tables in my database, hourlyUpdates and archiveUpdates. I would like to create a php script that would cut the data from hourlyUpdates table and append it to archiveUpdates table. The main question is how can I cut the data to be sure that i have removed only exactly what was select statment. For example, hourlyUpdates table has data a,b,c I append the data to archiveUpdates, by the time append has finished hourlyUpdates  has a,b,c,d data. When I remove the data I need to be that I remove only what I have copied.

Link to comment
Share on other sites

1. select all the data on that given period

2. insert that in your db

3. check if has been successfully added

4. delete all those added data on your 1st table( if data has been added successfully on step 3)

 

hmm....

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.