고수님들 쿼리문좀 봐주세요.. 채택완료
//날짜 포멧변경
$start_timeZ = date("y-m-d H:i", strtotime($stime_tmp)); $end_timeZ = date("y-m-d H:i", strtotime("$stimeZ +{$row[wr_1]} minutes"));
$result = sql_fetch("select * from $rv_table where date='{$date[$i]}' and mb_id = '$row[mb_id]' and ((time >= '$start_time' and time < '$end_time') or (
DATE_ADD(CONCAT('date',' ',time), interval wr_1 HOUR_MINUTE) >= '$stimeZ'
and
DATE_ADD(CONCAT('date',' ',time), interval wr_1 HOUR_MINUTE) < '$dtimeZ')
)
");
붉은 색부분을 저렇게 하면...
테이블에 입력된 date 필드값과 time필드값을 붙여서 17-11-08 11:00 포멧으로 된 후에 wr_1 필드의 50분을 더하여 17-11-08 11:50분이 되어서 그 값과 변수 $stimeZ에 입력된 값과 비교되는거 맞나요?
즉, 테이블의 date 필드와 time 필드를 붙여서 거기에 wr_1값(분)을 더한 값과 변수를 비교하고 시퍼요~~~
댓글을 작성하려면 로그인이 필요합니다.
답변 2개
답변을 작성하려면 로그인이 필요합니다.
로그인전체 질문 목록
채택
답변대기
답변대기
채택
답변대기