문제

I am locked with how to fill the following code

$criteria->addSearchCondition('esdate', 'now()-interval \'1 day\'', false, 'AND', '>');

if I use 'now()' alone it could work but as soon as I add the interval function I cannot get it done. I guess the escaped quote may not be accepted, but was unable to find any correct syntax.

Any help more than appreciated...

도움이 되었습니까?

해결책

$criteria->addCondition( "esdate > NOW() - INTERVAL 1 DAY" );
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top