DISPLAYING ONLY TODAY’S RECORD - Aug 3rd, 2010


User jtedescojam set up a number of records in a multi record editor and wanted to be able to be able to display a
record’s information only when the date in it’s date field matched the actual date.

Dave Edis from Interactive Tools had a simple suggestion.

In the get records call for that editor at the top of the page add this code:



'where' => "YEAR(date) = YEAR(NOW()) AND DAYOFYEAR(date) = DAYOFYEAR(NOW())",



he noted that there’s a lot more information about date functions at:

http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html

Thanks Dave.



The materials on this web site have been created for use with CMS Builder content management software. CMS Builder software is published and licensed for use by InteractiveTools.com. Please contact Interactive Tools for information on the downloading of the software or the purchasing of licenses.


Terms of Service