更新时间:2022-12-12 11:34:26
如果你想在 mysql comumn 字段上使用 INTERVAL (in Doctrine 2, DQL),你可以使用如下,
If you want to use INTERVAL (in Doctrine 2, DQL) on mysql comumn field, You can use as below,
$qb->andWhere("DATE_ADD(pv.appointmentDate,48,'hour') >= UTC_TIMESTAMP()");
它将打印如下SQL,
...... DATE_ADD(p0_.appointmentDate, INTERVAL 48 HOUR) >= UTC_TIMESTAMP() .....