Hi guys,
I'me trying to get the age of a user that i have in my database based on the data type field in database.
So in my database in tha data field i have 20.02.1989
Now i want to display the age of the user with a specific ID, i must mention that i want to display the age of all users that will be register in the database.
How can i do that because i've tried a lot of things and not of them seems to be working.
My code is below:
$dateValue = "SELECT EXTRACT(YEAR FROM data_nasterii) FROM bonacuora_clients WHERE id='$id'";
$c=date('Y');
$varsta = $c-$dateValue;
Thank you!