Create a shell task to fetch all records with featured == 1 and
end_date in the past. Run a cron job at midnight to call it.
On Wed, Dec 19, 2012 at 6:22 AM, Chris <chris69m@yahoo.com> wrote:
> hi guys,... can anyone help please
>
> I'm building promotional advertising feature on a site,...
> and have a table fields: "featured_start" once the user is call the function
> and "featured_end" after 30 days:
>
> $dba['Dba']['featured'] = 1;
> $dba['Dba']['featured_start'] = date('Y-m-d H:i:s');
> $after_30 = mktime(date("H"), date("i"), date("s"), date("m"), date("d")+30,
> date("y"));
> $dba['Dba']['featured_end'] = date('Y-m-d H:i:s', $after_30);
>
> now I want to set $dba['Dba']['featured'] = 0; after 30 days,
> and reset "featured_start" and "featured_end" to NULL
> so the promotion can stop,...
>
> how can I this,...?
>
> thanks in advance
> chris
>
>
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
Wednesday, December 19, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment