SELECT filmid FROM films select filmdate,filmtime,filmtitle,status,year(filmdate) as fyear,filmimage,filmid from films where status=1 and filmdate < #createDateTime(year(now()),month(now()),day(now()),0,0,0)# order by filmdate desc