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

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -