Re: Select MAX(date)

2009-02-03 Thread housebolt
Methinks you're thinking a little too hard on this one. I'm pretty sure you don't even need to use MAX(). $this-Model-find('first', array('order'='Model.date DESC')); Try that, I think that's what you're looking for. If not explain a bit more and I'll see if I can help. On Feb 3, 3:53 pm, gkc

Re: Select MAX(date)

2009-02-03 Thread gkc
That worked out just fine. Thanks! On Feb 3, 5:47 pm, housebolt garret.boltho...@gmail.com wrote: Methinks you're thinking a little too hard on this one. I'm pretty sure you don't even need to use MAX(). $this-Model-find('first', array('order'='Model.date DESC')); Try that, I think that's

Select MAX(date)

2009-02-03 Thread gkc
How would I structure a query to return the newest entry based on a date? If I was writing out the query I would just use MAX(date) but Im not sure how would format the $this-Model-find(). Any help would be greatly appreciated. gkc --~--~-~--~~~---~--~~ You