Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: CGI Program To Delete Old Data From MySQL Table?

by McA (Curate)
on Sep 30, 2013 at 15:31 UTC ( #1056377=note: print w/ replies, xml ) Need Help??


in reply to CGI Program To Delete Old Data From MySQL Table?

My advice:

delete from <tablename>;

where <tablename> is the name of your table. Then all rows older than 60 days are deleted.

McA


Comment on Re: CGI Program To Delete Old Data From MySQL Table?
Download Code
Re^2: CGI Program To Delete Old Data From MySQL Table?
by talexb (Canon) on Sep 30, 2013 at 15:50 UTC

    I wouldn't recommend running delete from <tablename>; -- that's going to delete everything from the table, leaving you with nothing.

    Alex / talexb / Toronto

    Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

      that's going to delete everything from the table

      Yes, including the records older than 60 days. The aim will have been reached. ;-)

        I'm happy to see that at least one Monk has some kind of humor. I forgot the irony tags. But with this kind of asking you can only get angry or sarcastic, IMO.

        Best regards
        McA

Re^2: CGI Program To Delete Old Data From MySQL Table?
by blue_cowdawg (Monsignor) on Sep 30, 2013 at 17:44 UTC

    drop database <name>;
    is much more efficient. :-D


    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1056377]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2014-09-22 02:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (177 votes), past polls