'where' date is greater than yesterday
2 posts by 2 authors in: Forums > CMS Builder
Last Post: September 4, 2008 (RSS)
Hi, all:
I'm new to php and am trying to set the display parameters in CMS builder. I would like the list to show only dates that are greater than or equal to yesterday. Does anyone have a recommendation?
T
I'm new to php and am trying to set the display parameters in CMS builder. I would like the list to show only dates that are greater than or equal to yesterday. Does anyone have a recommendation?
T
Re: [tsuluwerks] 'where' date is greater than yesterday
By Dave - September 4, 2008
Hi T, welcome to the CMS Builder forum! :)
It's possible with some (slightly complicated) MySQL code. Try using this line in your viewer code for the where:
'where' => " nameOfYourDateField >= (NOW() - INTERVAL 1 DAY) ",
That will show records with a date in the last 24 hours.
Hope that helps! Let me know how it works for you.
It's possible with some (slightly complicated) MySQL code. Try using this line in your viewer code for the where:
'where' => " nameOfYourDateField >= (NOW() - INTERVAL 1 DAY) ",
That will show records with a date in the last 24 hours.
Hope that helps! Let me know how it works for you.
Dave Edis - Senior Developer
interactivetools.com
interactivetools.com