최신게시물 검색이 안되네요. 정보
최신게시물 검색이 안되네요.본문
그 동안 제로보드만 사용하다, 그누보드4를 이번에 처음 새로 설치했습니다.
그런데, 그누보드의 index.php 파일로 들어가서 최근게시물을 누르면 자꾸 에러가 발생하네요.
에러 내용은,
Warning: Division by zero in /home/hosting_users/계정아이디/www/bbs/new.php on line 24
입니다.
new.php의 소스를 보여드릴게요.
<?
include_once("./_common.php");
include_once("./_common.php");
$g4[title] = "최근 게시물";
include_once("./_head.php");
include_once("./_head.php");
$sql_common = " from $g4[board_new_table] a, $g4[board_table] b, $g4[group_table] c
where a.bo_table = b.bo_table and b.gr_id = c.gr_id and b.bo_use_search = '1' ";
if ($gr_id)
$sql_common .= " and b.gr_id = '$gr_id' ";
if ($view == "w")
$sql_common .= " and a.wr_id = a.wr_parent ";
else if ($view == "c")
$sql_common .= " and a.wr_id <> a.wr_parent ";
if ($mb_id)
$sql_common .= " and a.mb_id = '$mb_id' ";
$sql_order = " order by a.bn_id desc ";
where a.bo_table = b.bo_table and b.gr_id = c.gr_id and b.bo_use_search = '1' ";
if ($gr_id)
$sql_common .= " and b.gr_id = '$gr_id' ";
if ($view == "w")
$sql_common .= " and a.wr_id = a.wr_parent ";
else if ($view == "c")
$sql_common .= " and a.wr_id <> a.wr_parent ";
if ($mb_id)
$sql_common .= " and a.mb_id = '$mb_id' ";
$sql_order = " order by a.bn_id desc ";
$sql = " select count(*) as cnt $sql_common ";
$row = sql_fetch($sql);
$total_count = $row[cnt];
$row = sql_fetch($sql);
$total_count = $row[cnt];
$rows = $config[cf_new_rows];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
입니다.
진하게 된 부분이, 24번째 열인데요... 도대체 어디에 문제가 있는건가요?
친절한 해답 부탁드릴게요. ^^
댓글 전체
제로와 그누는 command 자체가 다릅니다. 제로와 그누 혼동 하신듯 합니다.