On 9/18/06, ameshkin <[EMAIL PROTECTED]> wrote:
> But what I need to do, is somehow only show the results from the
> database where the birthday is in between two different ages.

Then do it in the database, not in PHP.

Assuming MySQL: year(current_date()) - year(date_of_birth) returns
almost someone's age. Almost, since it is one year too many if
someone's birthday hasn't passed yet in the current year. datediff()
comes to the rescue.

Read http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html
which will most likely give you enough information to build the query
on your own. And then you'll be your own genius :-)



-- 
  Martin Schapendonk, [EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to