Page 1 of 1
Trigger or Cron
Posted: Sat Nov 13, 2010 10:16 pm
by ScottCFR
I am working on an "announcement" system, and I want to have an expire option, so that it removes it's self from my site, but stays in the sql. I have everything ready, I just never messed with triggers before. I don't know if I should try cron at the same time..
Thanks,
Scott W.
Re: Trigger or Cron
Posted: Sat Nov 13, 2010 11:39 pm
by Weirdan
Set the expire date and filter out expired items in your selects:
Code: Select all
select anouncement.*
from announcement
//...
where expireDate > now()
//...
Re: Trigger or Cron
Posted: Sat Nov 13, 2010 11:48 pm
by ScottCFR
Are you saying, when the page is visited, check to see if the announcement is expired? If so.. why didn't I think of that lol.