开发者

EntityLoad dates in future

I have a table with events. I'm trying开发者_StackOverflow中文版 to display a list of all the events in the future. I'm using orm but I can't figure out for the life of me how to select dates in the future. The filters only accept "=" and not ">". I currently have this but it obviously doesn't work:

var events = entityLoad("tbl_events",{"eventActive" = 1, "eventDate" > NOW()},"EventDate Asc",{maxResults = count});


You have to use HQL

http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSf0ed2a6d7fb07688310730d81223d0356fc-7ffe.html

var events = ormExecuteQuery(from tbl_events where eventActive = 1 AND eventDate > ?, [now()]);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜