SQL functions or keywords in CakePHP conditions
For those who missed the information, starting from CakePHP 1.2 it is no longer possible to use the magic tag -! in your condition to prevent your SQL function or keyword to be enclosed in quotes.
The recommended way now is to place it into the key or not make the array associative at all. It is no longer possible to put it into the value part of the definition.
So instead of:
-
‘DATE_ADD(Payment.modified, INTERVAL 2 DAY) >’ =>
-
‘CURRENT_DATE’)
you have to use:
-
‘DATE_ADD(Payment.modified, INTERVAL 2 DAY) > CURRENT_DATE’)
May 29th, 2009 at 7:25 am
Thanks a lot it save me some extra hours. Thanks.