• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1766
  • Last Modified:

SQL/PHP Query to delete records listed before today's date.


I currently have a VERY simple database storing fixtures from our PE department.  At the moment I have a page that allows people to add events, and another page that allows the to search for and delete events.  What I'm after is a page, or even an automatic script that deletes events after they have happened so that they're not still listed weeks and weeks afterwards.
1 Solution
Guy Hengel [angelIII / a3]Billing EngineerCommented:
in MySQL, the query to run would be this:

delete from yourtable where date_col < current_date()
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now