Проблема с параметром даты Doctrine DIALPhp

Кемеровские программисты php общаются здесь
Anonymous
Проблема с параметром даты Doctrine DIAL

Сообщение Anonymous »

Привет, у меня есть работающий DQL (я получаю все свои мероприятия с самого начала):

Код: Выделить всё

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");
В моем файле error.log есть такая строка:

Код: Выделить всё

 #0 /var/www/Doctrine/ORM/Query/AST/InputParameter.php(46): Doctrine\\ORM\\Query\\QueryException::invalidParameterFormat('?')
print_r даты дает мне: 2011-08-01 00:00:00, что правильно.

Вот сопоставление даты:

Код: Выделить всё

/**
* Date of the event.
* @Column(type="datetime")
*/
private $date;
Любая помощь приветствуется, спасибо!

Подробнее здесь: https://stackoverflow.com/questions/703 ... er-problem

Вернуться в «Php»