Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Deleting Old MySql Records With PERL

by Milti (Beadle)
on Jul 15, 2016 at 16:55 UTC ( [id://1167846]=note: print w/replies, xml ) Need Help??


in reply to Re: Deleting Old MySql Records With PERL
in thread Deleting Old MySql Records With PERL

Thanks for all the feedback. I believe I now have it figured out.

I added a column to the table and named it DateAdded with Type - TIMESTAMP, NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP. The comparison you suggested now seems to work in that it does not delete rows that were placed in the table today. After a couple of days I will change the INTERVAL to 2 or 3 days and see what happens when I try the query in the Mysql client. I still have a column named 'Posted' which contains a date in simple English, i.e. Month Day, Year.

  • Comment on Re^2: Deleting Old MySql Records With PERL

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-09-15 06:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (21 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.