조회 검색부분 날짜 설정.. ^^ 정보
조회 검색부분 날짜 설정.. ^^본문
조회부분이 1년정도로 기본 검색되게 하고 싶습니다. (현재는 당일 날짜만 표시되서 불편해서요)
현재는 주문날짜 : 20130310 ~ 20130310 검색 이런식으로 나오거든요.
근데 이걸 주문날짜 : 20120310 ~ 20130310 검색 이렇게 바꾸고 싶습니다.
아래는 소스입니다.
$tmp_startDate = substr($startDate,0,4)."-".substr($startDate,4,2)."-".substr($startDate,6,2);
이부분을 고쳐야 적용될것 같은데 좀 알려주세요.
<?
if(!$startDate || $startDate == ""){$startDate = date("Ymd");}
if(!$endDate || $endDate == ""){$endDate = date("Ymd");}
$tmp_startDate = substr($startDate,0,4)."-".substr($startDate,4,2)."-".substr($startDate,6,2);
$tmp_endDate = substr($endDate,0,4)."-".substr($endDate,4,2)."-".substr($endDate,6,2);
$beTween = " and (buy_datetime >= '".$tmp_startDate." 00:00:00' and buy_datetime <= '".$tmp_endDate." 23:59:59') ";
?>
주문날짜 :
<input type="text" class="ed" style="width:65px" name="startDate" readonly value="<?=$startDate?>" id="mb_start" onclick="win_calendar('mb_start', document.getElementById('mb_start').value, '');">
현재는 주문날짜 : 20130310 ~ 20130310 검색 이런식으로 나오거든요.
근데 이걸 주문날짜 : 20120310 ~ 20130310 검색 이렇게 바꾸고 싶습니다.
아래는 소스입니다.
$tmp_startDate = substr($startDate,0,4)."-".substr($startDate,4,2)."-".substr($startDate,6,2);
이부분을 고쳐야 적용될것 같은데 좀 알려주세요.
<?
if(!$startDate || $startDate == ""){$startDate = date("Ymd");}
if(!$endDate || $endDate == ""){$endDate = date("Ymd");}
$tmp_startDate = substr($startDate,0,4)."-".substr($startDate,4,2)."-".substr($startDate,6,2);
$tmp_endDate = substr($endDate,0,4)."-".substr($endDate,4,2)."-".substr($endDate,6,2);
$beTween = " and (buy_datetime >= '".$tmp_startDate." 00:00:00' and buy_datetime <= '".$tmp_endDate." 23:59:59') ";
?>
주문날짜 :
<input type="text" class="ed" style="width:65px" name="startDate" readonly value="<?=$startDate?>" id="mb_start" onclick="win_calendar('mb_start', document.getElementById('mb_start').value, '');">
댓글 전체
<?
if(!$startDate || $startDate == ""){$startDate = date("Ymd",strtotime("-1 year"));}
if(!$startDate || $startDate == ""){$startDate = date("Ymd",strtotime("-1 year"));}
감사합니다.