【发布时间】:2015-05-29 07:37:24
【问题描述】:
我的 silverstripe 查询不起作用(它输出所有消息,而不是日期范围内的消息)
解决此查询的最佳方法是什么? 我对 silverstripe 还很陌生,还没有找到有关如何打印原始查询的信息。
return = Message::get()
->filter(array(
'IsPublished' => true,
'StartPublication:LessThanOrEqual' => date('Y-m-d'),
'Priority' => array('High', 'Normal')
))
->where("\"StopPublication\" >= ".date('Y-m-d')." OR \"StopPublication\" IS NULL")
->sort('StartPublication', 'DESC')->limit($this->getLimit());
【问题讨论】:
标签: sql silverstripe datalist