how do I delete database row after set time

2 views
Skip to first unread message

shanto sas

unread,
Oct 21, 2009, 1:01:50 PM10/21/09
to phpex...@yahoogroups.com, cse...@yahoogroups.com, ph...@googlegroups.com
hi experts,

I have a database with some data. I have added DATETIME to the form entry when the words are submitted.So in mysql it shows this: 2008-03-27 11:38:54How can I automatically delete the row after a set time from the time entered? i.e, 6 hours?

i want to do it using a php script. can it possible without use cron task.

thank you for read my problem.


--
Regards,

Saeed Ahmed
Rajshahi, Bangladesh
Blog: http://saeed05.wordpress.com
--
Follow Me LinkedinTwitter


Get your preferred Email name!
Now you can @ymail.com and @rocketmail.com.

Lenin

unread,
Oct 21, 2009, 9:44:27 PM10/21/09
to ph...@googlegroups.com, phpex...@yahoogroups.com, cse...@yahoogroups.com
On Thu, Oct 22, 2009 at 12:01 AM, shanto sas <saee...@yahoo.com> wrote:
hi experts,

I have a database with some data. I have added DATETIME to the form entry when the words are submitted.So in mysql it shows this: 2008-03-27 11:38:54How can I automatically delete the row after a set time from the time entered? i.e, 6 hours?

i want to do it using a php script. can it possible without use cron task.

thank you for read my problem.
Some will have to run the PHP script after six hours according to the time in the DB record. Who will?
You of course need a regular checking cronjob for such a field and when its time the action will be triggered.

Lenin
Reply all
Reply to author
Forward
0 new messages