【发布时间】:2015-10-26 11:23:41
【问题描述】:
我被困在这里,我花了最后 2 天解决这个问题,但失败了。我正在我的存储库中编写一个查询以获取当月的条目。这是我的查询:-
$this->getEntityManager()
->createQuery('SELECT count(a) FROM CollegeStudentBundle:StudentAttendance a where a.student_id='.$id.'
and a.date > DATE_SUB(CURRENT_TIMESTAMP(),INTERVAL 1 MONTH)')
当我尝试运行它时,它给了我一个错误
[Syntax Error] line 0, col 133: Error: Expected Doctrine\ORM\Query\Lexer::T_COMMA, got '1'
即使我尝试了this thing,但没有帮助我。
【问题讨论】:
标签: symfony doctrine doctrine-orm