Код: Выделить всё
DoctrineHelper::getEntityManager()->createQueryBuilder()
->select("u.surname, count(u.surname) as total")
->from("User", "u")
->from("AbstractEvent", "e")
->from("Attendance", "a")
->where("u = a.attendee")
->andWhere("e = a.event")
->andWhere("a.status=1")
->andWhere("e.date?", date('Y-m-d 00:00:00', strtotime('-'.(date('j')-1).' day')) )
->groupBy("u.email")
->orderBy("total","desc");
Код: Выделить всё
#0 /var/www/Doctrine/ORM/Query/AST/InputParameter.php(46): Doctrine\\ORM\\Query\\QueryException::invalidParameterFormat('?')
Вот сопоставление даты:
Код: Выделить всё
/**
* Date of the event.
* @Column(type="datetime")
*/
private $date;
Подробнее здесь: https://stackoverflow.com/questions/703 ... er-problem
Мобильная версия