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
Post a Comment