There is a database where all registered users are stored. There is a field of birth. How to get all the entries that have a birthday today? I did what I can get records if he was born on this day including the year
$today = date("dmY"); $users = $this->pages_model->get_users(); foreach ($users as $item){ $result=(strtotime($item['birthday'])==strtotime($today)); if ($result){ echo $item['fio']; } } But I need to get records, that if he has a birthday on 05/19/1988, he also received this record.
All anything, it was possible to play with the request, but the $item['birthday'] field in mySQL is not a date , but varchar .
How to be?