Both of these are php questions rather than cakephp...
The period is the php string concatenation operator - $var =
'con'.'cat'.'e'.'nation'; is the same as $var = 'concatenation';
date and strtotime are base php functions. strtotime("-2 weeks")
returns a unix timestamp representing 2 weeks before the current time.
date() formats that timestamp to a string. Assuming that this line is
executed on Thursday 24th January 2008, this is equivalent to:
"Post.created" => "> 2008-01-10"
Which will generate the SQL fragment "`Post`.`created` > '2008-01-10'"
So yeah, it means anything in the past 2 weeks or the future.
On Jan 24, 9:42 am, bob <[EMAIL PROTECTED]> wrote:
> what does this mean
> "Post.created" => "> " . date('Y-m-d', strtotime("-2 weeks")
>
> the date is greater that 2 weeks ago?
>
> what does the period . mean in this case?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---