I am stuck here and I spent the last 2 days solving this problem, but could not. I am writing a request in my repository to get entries for the current month. here is my request: -
$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)')
When I try to run this, it gives me an error
[Syntax Error] line 0, col 133: Error: Expected Doctrine\ORM\Query\Lexer::T_COMMA, got '1'
Even I tried this thing , but it didn’t help me.
source share