calendar listing recorda matching today forward and limit

4 posts by 3 authors in: Forums > CMS Builder
Last Post: December 9, 2009   (RSS)

By markr - December 8, 2009

I need to create a 'upcoming events' listing that selects records with a date field matching or after today's date but this is not working:


WHERE date(datefield) >= CURdate()

Any ideas?

(Looking forward to diving into 2.0)

Re: [markr] calendar listing recorda matching today forward and limit

I recently did that same thing for listing radio shows. The center of the page lists the upcoming shows and they are automatically moved to the archive list in the sidebar after the broadcast date. Two lists with reverse filters.

list($future_radio_showRecords, $radio_showMetaData) = getRecords(array(
'tableName' => 'radio_show',
'where' => 'hidden="0" and show_date >= (NOW() - INTERVAL 1 DAY)',
));

list($past_radio_showRecords, $radio_showMetaData) = getRecords(array(
'tableName' => 'radio_show',
'orderBy' => 'show_date DESC',
'where' => 'hidden="0" and show_date < (NOW() - INTERVAL 1 DAY)',
));


Hope this helps out.
Ron Conring
Conring Automation Services
----------------------------------------
Software for Business and Industry Since 1987

Re: [rconring] calendar listing recorda matching today forward and limit

By ross - December 9, 2009

Hi Ron

Thanks for posting :). Always glad to see everyone helping out :).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/