답변 3개
채택된 답변
+20 포인트
https://dev-rido.tistory.com/95 -> 날자구하기 참조 하세요
$nowYmd = date(Ymd, G5_SERVER_TIME);
$startYmd = date('Ymd', strtotime('-'.$days." day", G5_SERVER_TIME));
쿼리문
$sql = " select * from {게시판테이블} WHERE date_format(wr_datetime, '%Y%m%d') between '{$startYmd}' and '{$nowYmd}' order by wr_hit desc ";
답변을 작성하려면 로그인이 필요합니다.