PHP with GNU 게시판 새글 갯 수
페이지 정보
- 작성자후야
- 조회 : 168
- 작성일 : 2021-03-11 23:45
본문
게시판에서 새글아이콘이 붙는 글에 해당되는 글의 갯수를 구함
$count = notice_recent('게시판테이블');
function notice_recent($bo_table) {
global $g5;
$temp = sql_fetch("select bo_new from {$g5['board_table']} where bo_table = '".$bo_table."'");
$time_set = date("Y-m-d H:i:s", time() - $temp['bo_new'] * 3600);
$row = sql_fetch("select count(distinct `wr_id`) as `cnt` from {$g5['write_prefix']}$bo_table where wr_is_comment = '0' and wr_datetime > '$time_set'");
if($row['cnt']) {
return $row['cnt'];
} else {
return 0;
}
}
- 이전글목록 페이지에 특정 이미지 원본 선택해서 출력하기(by gnustudy) 2021.03.27
- 다음글텔레그램 Chat ID 알아보는 방법 2021.02.15