This is something that I've also wondered about in the past so if
anyone has better ideas please let me know. The way I do it is just
use a string condition (or combination of array and string
conditions).

$continent =  $this->mymodel->findAll("mymodel.start_time > = NOW()
AND mymodel.end_time < NOW()", null, null, null, 0, 1);

Cheers,
Adam

On Dec 9, 7:39 pm, "Cristian Vrabie" <[EMAIL PROTECTED]>
wrote:
> If i use something like the find below, it will issue wrong results because
> CURRENT_TIMESTAMP it will be wrapped in single quotes as a string. I know
> that CURRENT_TIMESTAMP is not available on all db sources, but as i'm
> interested only in mysql and oracle (that do support), can't i do something
> so that cake won't interpret it as a string?
>
> $continent =     $this->mymodel->findAll(
>                             array (    '`mymodel`.`start_time`' => '>=
> CURRENT_TIMESTAMP',
>                                          '`mymodel`.`end_time`' => '<
> CURRENT_TIMESTAMP' ),
>                             null, null, null, 0, 1
>                         );
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to