Jump to content

Make Mysql delete information daily


drakecai

Recommended Posts

is there an alternative? I tried and it works for my remote computer but when I tried implementing that same code into godaddy's phpmyadmin it gave me an error. Also for the one that worked it kept on telling me that "this value is not allowed" whether i put 1, a or null

 

i'm trying to get mysql to drop a table every 24 hours at 12:00 and then recreate the table fresh without data inside the table at 12:01 any ideas?

i have never used MySQL event scheduling. here is the manual page for creating a new event:

 

http://dev.mysql.com/doc/refman/5.1/en/create-event.html

 

the first thing that jumps out at me is this:

 

The event will not run unless the Event Scheduler is enabled.

 

Whether or not that is enabled might be a question for your web host.

Thanks I just recently found that out, can someone give me the crontab code to clear out my table?

That question doesn't make any sense.

 

There is no such thing as "crontab code" -- you just indicate which executable you'd like it to run a given interval.

 

That executable is likely a php script that runs whatever code you would normally run to do this work.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.