Re: 30 day expiration on blog posts and displays days to expiration in view?

2010-09-12 Thread Lance
Thanks for the help. I ended up running this in my user model. It seems to work pretty well. function activePosts () { $posts = $this->find('all', array('conditions' => array( array('DATE_ADD(Post.created, INTERVAL 30 DAY) > CURRENT_DATE'; return $posts;

Re: 30 day expiration on blog posts and displays days to expiration in view?

2010-09-12 Thread cricket
On Sun, Sep 12, 2010 at 3:12 PM, Lance wrote: > I'm trying to create a expiration field for blog posts that will > display something like 25 days to expiration.  I added an expiration > DATETIME field in my database.  I want to make it 30 days from the > created DATETIME field in my database.  Can

30 day expiration on blog posts and displays days to expiration in view?

2010-09-12 Thread Lance
I'm trying to create a expiration field for blog posts that will display something like 25 days to expiration. I added an expiration DATETIME field in my database. I want to make it 30 days from the created DATETIME field in my database. Can anyone steer me in the right direction. I imagine I'l