我需要mysql日期函数,因为我只想用date而不是dateTime排序。
$dql = "SELECT r FROM Entities\Reservation r ";
$dql .= "JOIN r.lot l ";
$dql .= "LEFT JOIN r.car c";
$dql .= " WHERE l.id = '" . $lot->id . "'" ;
$dql .= " AND r.complete ='1' ";
$dql .= " AND r.cancelled=0";
$dql .= " ORDER BY r.start DESC, c.is_disabled_person DESC";
$query = $this->getEntityManager()->createQuery($dql);
$query = $this->getResult();