But what I need to do, is somehow only show the results from the
database where the birthday is in between two different ages.
If you store your data in your database in a supported date format you can do everything with one mysql statement.
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-type-overview.html
For mysql the link above has an overview of the date formats.
For calculating age there are several ways of manipulating dates in php. The libraries at pear.php.net have some date functionality as well.
A google search revealed http://www.devnewz.com/devnewz-3-20051128CalculatingtheDifferenceBetweenTwoDatesUsingPHP.html , which has a function and a usecase for calculating age. You might want to reference a more flexible way with dealing with dates if you change the way they are stored in the database so that you can use a select statement to get a range.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
