usually tells you what is wrong).
A shot in the dark but it could be this simple: array('((DAYNAME
(Model.field)))' => 'Monday');
On Jun 2, 12:46 pm, toby1kenobi <toby.math...@gmail.com> wrote:
> Hi there,
>
> Is it possible to use MySQL's DAYNAME function in the where clause
> of a call to 'find'? i.e. something a bit like:
>
> $this->paginate['conditions'] = array('DAYNAME(Model.field)' =>
> 'Monday');
>
> The above doesn't work (which is what I was expecting) but I haven't
> managed to find an equivalent syntax that does.
>
> I'm wondering if I should pursue another route? I could put
> something in afterFind, and test that I'm in the appropriate action as
> detailed in this useful post, would that be the best approach?
>
> http://teknoid.wordpress.com/2009/05/04/execute-code-in-model-callbac...
>
> As ever, any help is greatly appreciated.
>
> Toby
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment