Hide past dates

3 posts by 2 authors in: Forums > CMS Builder
Last Post: June 20, 2016   (RSS)

By gregThomas - June 20, 2016 - edited: June 20, 2016

Hey degreesnorth, 

I think the main issue is that your missing a opening quotation mark:

// load records from 'whats_on'
list($whats_onRecords, $whats_onMetaData) = getRecords(array(
'tableName' => 'whats_on',
'orderBy' => 'DATE',
'loadUploads' => true,
'allowSearch' => false,
'where' => "`date` >= TIMESTAMP(CURDATE(), '00:00:00')",

));

You also need to use a backtick to wrap the date field name (below the escape key) instead of the quotation mark. I've highlighted the characters in red above. 

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

Perfect, thanks so much.