Delete records in mysql database where record is less than today


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Delete records in mysql database where record is less than today
# 1  
Old 07-23-2012
Delete records in mysql database where record is less than today

Guys, I need help.


I need to create a script to delete records in mysql database where record is 2 days old.

Thanks.
# 2  
Old 07-23-2012
Ok, where did you get stuck? Show your works so far and if the records have a timestamp. Use code tags when you post an excerpt of your tries and table snippet.
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Multiple Records from 1 Record

I need to make one record to multiple records based on occurence column in the record and change the date.For example below first record has 5 ,so need to create 5 records from one and change the date to 5 months.Occurence can be any number. I am unable to come with a script.Can some one help ... (5 Replies)
Discussion started by: traininfa
5 Replies

2. Shell Programming and Scripting

Need unix commands to delete records from one file if the same record present in another file...

Need unix commands to delete records from one file if the same record present in another file... just like join ... if the record present in both files.. delete from first file or delete the particular record and write the unmatched records to new file.. tried with grep and while... (6 Replies)
Discussion started by: msathees
6 Replies

3. Shell Programming and Scripting

reformat one record from two records

I have not get much answer/solution for the posting. Here I break down the question and hope to get some help. 1. How can I use AWK to read in two records at the same time and keep loop to next two when the condition is meet? position 1-10 --> Unique to identity whether... (4 Replies)
Discussion started by: menglm
4 Replies

4. Web Development

Updating Records in Mysql Database

so when i issue a command like the below: # mysql --pager=/usr/bin/less -u cactiman -p -e 'select * from data_input' cacti Enter password: ... (2 Replies)
Discussion started by: SkySmart
2 Replies

5. Shell Programming and Scripting

Delete files older than today

is it -mtime +1 as i need all files older than today to be deleted (6 Replies)
Discussion started by: dinjo_jo
6 Replies

6. Shell Programming and Scripting

converting all records of a file in to one record

I have a file temp.dat. The contents of this file is as follows abcdefgh abcdefgh abcdefgh abcdefgh abcdefgh abcdefgh The multiple records in this file needs to be converted in to a single record. abcdefgh abcdefgh abcdefgh abcdefgh abcdefgh abcdefgh (2 Replies)
Discussion started by: rsriramiyer
2 Replies

7. UNIX for Advanced & Expert Users

Parsing records from one record

Hi, I got a file which is one huge record. I know each record should be 550 bytes long. How do I parse out the records from the one huge record. (1 Reply)
Discussion started by: bwrynz1
1 Replies
Login or Register to Ask a Question