php - Codeigniter get user who has today's birthday -


codeigniter:

$this->db->select("*"); $this->db->from("clients"); $this->db->where("month(birth_date)","month(now())"); $this->db->where("day(birth_date)","day(now())"); return $this->db->get()->result_array(); 

anyone can me how can user has today's birthday? why function not working?

you can try solution problem.

$this->db->select("*"); $this->db->from("clients"); $this->db->where("extract(month `birth_date`)","month(now())"); $this->db->where("extract(day `birth_date`)","day(now())"); return $this->db->get()->result_array(); 

i hope helps you.


Comments

Popular posts from this blog

php - Embed BBCode within itself not working -

three.js - how to load gltf in three JS -

sql server - T-SQL: Access DB objects in same schema without qualifying? -