스케줄에 글을 작성하면 기존에 있던 작성글이 사라져요

while($content = $list->hasNext()) { 

    if (strtotime($cal_year."-".$cal_month."-01") <= strtotime($content->option->name) && strtotime($cal_year."-".$cal_month."-".$cal_last_day) >= strtotime($content->option->tel)) {
        // [ ( ) ]
        $cal_start_i = (int)substr($content->option->name, -2);
        $cal_end_i = (int)substr($content->option->tel, -2);
    }
    if (strtotime($cal_year."-".$cal_month."-01") > strtotime($content->option->name) && strtotime($cal_year."-".$cal_month."-"."-01") <= strtotime($content->option->tel) && strtotime($cal_year."-".$cal_month."-".$cal_last_day) >= strtotime($content->option->tel)) {
        // ( [ ) ]
        $cal_start_i = 1;
        $cal_end_i = (int)substr($content->option->tel, -2);
    }
    if (strtotime($cal_year."-".$cal_month."-01") <= strtotime($content->option->name) && strtotime($cal_year."-".$cal_month."-".$cal_last_day) >= strtotime($content->option->name) && strtotime($cal_year."-".$cal_month."-".$cal_last_day) < strtotime($content->option->tel)) {
        // [ ( ] )
        $cal_start_i = (int)substr($content->option->name, -2);
        $cal_end_i = 31;
    }
    if (strtotime($cal_year."-".$cal_month."-01") > strtotime($content->option->name) && strtotime($cal_year."-".$cal_month."-".$cal_last_day) < strtotime($content->option->tel)) {
        // ( [ ] )
        $cal_start_i = 1;
        $cal_end_i = 31;
    }
    if (strtotime($cal_year."-".$cal_month."-01") > strtotime($content->option->tel)) {
        // ( ) [ ]
        $cal_start_i = 0;
        $cal_end_i = 0;
    }
    if (strtotime($cal_year."-".$cal_month."-".$cal_last_day) < strtotime($content->option->name)) {
        // [ ] ( )
        $cal_start_i = 0;
        $cal_end_i = 0;
    }
    

    $cal_list_count = 0;
    $select_std = explode("-", $content->option->name);
    $select_std_day = $select_std[2];
    $select_end = explode("-", $content->option->name);
    $select_end_day = $select_end[2];

 

저 조건이 이상한건가요? name이 시작날이고 tel이 종료날 입니다. cal_last_day는 마지막날입니다.

좋은 정보와 인맥을 동시에, 워드프레스 사용자 단톡방 참여하기
워드프레스 에러 기술지원 서비스 전문가에게 맡기세요
워드프레스 에러 기술지원 서비스 전문가에게 맡기세요