你好我想用 DATE_ADD
但我还是有错误
$invoices = $this->em->createQueryBuilder()
->select('i')
->from(InvoiceEntity::class, 'i')
->where('i.active = 1 AND i.paid = 0 AND DATE_ADD(i.due_date, 14, \'DAY\') <= :today')->setParameter('today', date('Y-m-d'))
->getQuery()->getResult();
错误:
[Syntax Error] line 0, col 98: Error: Expected `Doctrine\ORM\Query\Lexer::T_CLOSE_PARENTHESIS`, got ','
`SELECT i FROM App\Entity\InvoiceEntity i WHERE i.active = 1 AND i.paid = 0 AND DATE_ADD(i.due_date, 14, 'DAY') <= :today`
暂无答案!
目前还没有任何答案,快来回答吧!