Get members by birthday duration

SELECT distinct id FROM `members` 
where birthday is not null 
and month(birthday) >= 9 and day(birthday) >= 1 
and month(birthday) <= 10 and day(birthday) <= 31

PHP

    function add_members($coupon_id, $bd_from, $bd_to){
        $sql = "insert into `coupon_bd_members` 
            (coupon_id, member_id, created_at) 
            (SELECT distinct ?, id, ? 
            FROM `members` 
            where birthday is not null 
            and month(birthday) >= ? and day(birthday) >= ? 
            and month(birthday) <= ? and day(birthday) <= ?
            )";

        $from = Carbon::parse($bd_from);
        $to = Carbon::parse($bd_to);

        $values = [
            $coupon_id, 
            Carbon::now()->toDateTimeString(), 
            $from->month, 
            $from->day, 
            $to->month, 
            $to->day
        ];

        $result = $this->db->query($sql, $values);
        //logg($this->db->last_query());

        return $result;
    }