Jump to content

birhtdate to age


brown2005

Recommended Posts

i have a field in a table

 

birthdate

 

and i have a function age();

 

if i use

 

$sql = "SELECT brithdate, COUNT(*) AS birthdate_count FROM members;";

 

will echo out, say:

 

birthdate      3

 

but really i want it to echo

 

19  3 

 

how would I go about fitting in my age() function or would I need to have a field in the table for age, as I didnt want to do this as i would need to keep updating it, where as with a function it runs automatically...

 

any help please?

Link to comment
https://forums.phpfreaks.com/topic/41343-birhtdate-to-age/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.