테스트 사이트 - 개발 중인 베타 버전입니다

특정회원 일주일간 작성한 글수 구하기 때문에 질문 드립니다.

미니니 8년 전 조회 2,053

특정회원을 오늘날짜 기준으로 일주일전까지 작성한 글수를 구할려면 어떻게 해야 할까요?

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

플래토
8년 전

특정회원....mb_id = 'abc' 라고 가정을 하죠

</p><p>// 테이블명을 모르니 그냥 g5_write_table 이라하죠</p><p>
</p><p>$sql = "select count(*) cnt from g5_write_table where mb_id = 'abc' and wr_datetime >= <span style="font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-style: inherit; font-variant-ligatures: inherit; font-variant-caps: inherit; font-weight: inherit; white-space: inherit; background-color: rgb(239, 240, 241); color: rgb(57, 51, 24); font-size: 13px;">DATE_ADD(NOW(), INTERVAL -7 DAY) ";</span></p><p><span style="font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-style: inherit; font-variant-ligatures: inherit; font-variant-caps: inherit; font-weight: inherit; white-space: inherit; background-color: rgb(239, 240, 241); color: rgb(57, 51, 24); font-size: 13px;">
</span></p><p><span style="font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-style: inherit; font-variant-ligatures: inherit; font-variant-caps: inherit; font-weight: inherit; white-space: inherit; background-color: rgb(239, 240, 241); color: rgb(57, 51, 24); font-size: 13px;">...</span></p><p><span style="font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-style: inherit; font-variant-ligatures: inherit; font-variant-caps: inherit; font-weight: inherit; white-space: inherit; background-color: rgb(239, 240, 241); color: rgb(57, 51, 24); font-size: 13px;">

쿼리문이 필요하신거라 생각하여 여기까지만..

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인