답변 2개 / 댓글 3개
채택된 답변
+20 포인트
Copy
select sum(wr_1) as total
from g5_write_aaa
where year(wr_datetime) = year(current_date - interval 1 month)
and month(wr_datetime) = month(current_date - interval 1 month)
이렇게 하시면 됩니다.
$month_first = date("m", strtotime(G5_TIME_YMD."-1 month"));
답변에 대한 댓글 2개
답변을 작성하려면 로그인이 필요합니다.