开发者

EntityLoad dates in future

开发者 https://www.devze.com 2023-02-06 19:36 出处:网络
I have a table with events. I\'m trying开发者_StackOverflow中文版 to display a list of all the events in the 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

精彩评论

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