I have an application where I need to get the maximum value out of a
table. Right now I'm using the following:
$foo = $this->Stat->findBySql("SELECT MAX(s_date) AS s_date FROM stats");
$s_date = $foo[0][0]['s_date'];
Is there a better, more elegant way to do this?
--
Chris Hartjes
"The greatest inefficiencies come from solving problems you will never have."
-- Rasmus Lerdorf
@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---