Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

how to delete records older then 30 days

New Here ,
Mar 05, 2008 Mar 05, 2008
hi there

how can i update or delete a record if the date is older then 30 day.

when soem one joins the members area thier account should be deleted after 30days.

when i design my table should i set the date field to datetime or timestamp?

thanks in advance for help.
TOPICS
Server side applications
275
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 06, 2008 Mar 06, 2008
LATEST
> how can i update or delete a record if the date is older then 30 day.
>
> when soem one joins the members area thier account should be deleted after
> 30days.
>
> when i design my table should i set the date field to datetime or
> timestamp?

You could probably use either.

To actually delete the records, though, you'll have to run a process. You
could schedule something in the DB possibly, or on the server.

Alternatively, you could just have this process called once a day from
someone hitting the site and log it in a DB.

Ie, have a script:

if "DB log has been updated today then"
"do nothing"
else
"run delete script"
"log that it's been run today"
end

-Darrel


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines