[英]Doctrine 1.2 how to compare dates
如何在 Doctrine 1.2 ORM 的 where 子句中设置条件以在 DQL 示例中指定大于日期
Doctrine_Query::create()
->from('user u')
->where(?)
->execute();
谢谢
例如:
$one_year_ago = date('Y-m-d H:i:s', strtotime('1 year ago'));
->where('u.created_at > ?', $one_year_ago)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.