This blog is about the PHP solutions I have to think of when I'm developing systems almost every single day...

Monday, May 12, 2008

Using mysql functions in cakephp

Sometimes it's just easier to use mysql functions in the conditions. But cakephp automatically quote them. To disable the automatic quoting for any field just prefix the variable with a -! for example:


$notifications=$this->Notification->findAll(array('notification_date'=>'>= -!now()'));