1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

How do you copy tables for archiving?

Discussion in 'Web Design & Development' started by jlee, Sep 2, 2004.

Thread Status:
Not open for further replies.
  1. jlee

    jlee Thread Starter

    Joined:
    Jul 20, 2004
    Messages:
    14
    Hi

    I have a table in a database within phpmyadmin and have a delete sql statement that works fine. However, as well as deleting the entry from table1 I want to copy it to table2 which is basically used as an archive. So the main table has current information and the older records are kept in table2 - is there any way to do this?

    Thanks
     
  2. Rockn

    Rockn

    Joined:
    Jul 29, 2001
    Messages:
    21,334
    Make a table that you can archive to that has the same structure as the data you are deleting. Make the query that updates the new table based on the query and when that is done have it delete the entries from the main table.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/269314

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice