i want to clear all data in databse automatically for everymonth.iam using xampp.

Add a timestamp in every table and use that to determine whether or not it should be deleted.

sorry....will you please write one example query

It's not that simple.

  1. Add a timestamp column to the tables you want to do this for.
  2. Make sure that when you insert a new record this date gets filled.
  3. Create a query to run at regular intervals to remove all records with old dates.

thank you so much
i have finishd 1st & 2nd step.
but strugling in 3rd step (i,e Create a query to run at regular intervals to remove all records with old dates.).bcoz i dont no hoew to write a query tat automaticaly execute

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.