베스트 추출 하루를 1주로
매일의 조회수를 집계하여 베스트를 추출하고 있는데요..
이것을 1주 단위로 바꾸려면 어떻게 해야 하나요...?
$oneday = date("Y-m-d H:i:s", $g4[server_time]-60*60*24);
$sql_where = " category_type = '2' and wr_is_comment = 0 and wr_datetime >= '$oneday' ";
이 부분을 바꿔야 할 것 같은데... 알려주시면 감사하겠습니다!
이것을 1주 단위로 바꾸려면 어떻게 해야 하나요...?
$oneday = date("Y-m-d H:i:s", $g4[server_time]-60*60*24);
$sql_where = " category_type = '2' and wr_is_comment = 0 and wr_datetime >= '$oneday' ";
이 부분을 바꿔야 할 것 같은데... 알려주시면 감사하겠습니다!
|
댓글을 작성하시려면 로그인이 필요합니다.
로그인
댓글 3개
==>
and wr_datetime >= (curdate() - interval 7 day) ";