Symfony2 Doctrine查詢構建器中實現的SQL的IFNULL
如何實現? 比方說,我有這個疑問:Symfony2 Doctrine查詢構建器中的IFNULL
select * from ticket order by IFNULL(modified_date, '2000-01-01') DESC, created_date DESC
我有這樣的DQL:
$this->qb->select("t, c.name")
->from("Ticket", "t");
$this->qb->orderBy("t.modifiedDate", "DESC");
$this->qb->addOrderBy("t.createdDate", "DESC");
現在如何添加IFNULL一部分?
我有我的symfony2項目相同的問題 – haynar 2012-02-02 10:54:36