Sorting by age issue.
View Single Post
07-31-2008, 07:20 PM
Join Date: Jun 2005
Originally Posted by
You could use MySQL to work out their age. However, the MySQL for that is rather intensive, and would require the HAVING clause. How about simply returning them all by the year, and then in the loop simply calculate their age and if it doesn't match ignore that one and continue.
Thanks for the reply, I'm just learning PHP along the way and I'm not the best at while loops.
How would I go about setting it up?
The number I am going to pass through will be the age then, so
$id=$_GET['id']; would be 23 for example.
And the variables are $month, $day and $year which when put in calculate_age($month, $day, $year) will calculate the age.
Not too sure how to write the while loop to look for the specified age.
View Public Profile
Send a private message to Jako
Find More Posts by Jako