How does removeDate function run?
3 posts by 2 authors in: Forums > CMS Builder
Last Post: June 24, 2015 (RSS)
By gversion - June 20, 2015
Hello,
I would like to use the removeDate function for some of my listings. In order for it to work do I need to be running a cron job?
Thanks,
Greg
By Dave - June 23, 2015
Hi Greg,
No, it's all automatic. How it works is that if you have a field called "removeDate" then it adds this to the WHERE query:
WHERE ... removeDate >= NOW()
And if you have a field called 'neverRemove' it adds this:
WHERE ... ( removeDate >= NOW() OR neverRemove = 1 )
So it never changes any of the records, it just hides them from the results if the removeDate is in the past.
Hope that helps!
interactivetools.com
By gversion - June 24, 2015
Hi Dave,
Thanks for the explanation. That's really useful to know!
Regards,
Greg