By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,902 Members | 1,268 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,902 IT Pros & Developers. It's quick & easy.

How to Automatic Delete Row by Period Time (phpMyAdmin)?

P: 4
Hello everyone. I need your help to finishing my Diploma Final Project. I have database MySQL in phpMyAdmin. Database name is "logger" and table name is "logger". The table have 2 column, there are: 1. Date & Time (timestamp type) and 2. Information (text type).
The date in database is receive for arduino every second. So, i want to delete the date after 14 days created in database. How do the solution for my final project problem?
Jun 8 '19 #1
Share this Question
Share on Google+
3 Replies

Expert 100+
P: 1,035
Is it a 1-time-action? Or should all actions be automatically be deleted when they are older than 14 days?

When it's a one-time action, you should be able to craft a 'DELETE FROM logger WHERE ...' statement in SQL. If you are not able to create that, than you fail exams for your Diploma Final Project.

If this needs to be done 'automatically', I do mean that everything older than 14 days is deleted, so when you come back tomorrow, or the day after tomorrow, you still do not see records that are older than 14 days. you wil need to read the manual for MySQL for it where it explains the Event Scheduler
Jun 8 '19 #2

P: 4
It's all action automatically be deleted when the date older than 14 days.
Ok thanks you, Luuk for the solution
Jun 8 '19 #3

Expert Mod 5K+
P: 5,397
(...) How do the solution for my final project problem? (...)
This is a Homework problem.
How is it fair to yourself, or your fellow classmates, that Luuk provided the solution?

FAQ: Posting Homework or Coursework Questions and Answers
Posting Homework or Coursework Questions and Answers
Any and all Homework/Coursework questions will be deleted. If you see a question that is a homework or coursework assignment then please remember DO NOT attempt to post a reply. Replies to this thread will be deleted along with the original post. Please 'report' the thread.
\\Thread is closed//
Jun 9 '19 #4

This discussion thread is closed

Replies have been disabled for this discussion.