카테고리 숫자가 틀리게 나와요!!

저기 가보시면,
이렇게 나오는데..괄호안에 숫자가 틀리게 나오네요
 
여기는 맞게 나오는데..왜그런가요?
|

댓글 7개

두군데 모두 틀리게 나옵니다.

확인해보니 댓글까지 함께 카운트 하는것 같군요
댓글빼고 원문만 세실려면 wr_is_comment = 0 조건을 주셔야할듯하네요
삼윤님 말데로 수정을 해줘도 이전과 똑같아요 ㅠ_ㅠ
쿼리문으로 어떤것을 주셨는지 알수 있을까요?
카테고리 카운터의 로직 부분을 올려주셔야 파악이 가능할듯...
<style type='text/css'>
/*-- 카테고리명 --*/
.cate {font-family:Tahoma,굴림,arial; color:#666666; font-size:12px;}
a.cate:link, a.b_ca:visited, a.b_ca:active {font-family:Tahoma,굴림,arial; color:#666666; font-size:12px;}
a.cate:hover {font-family:Tahoma,굴림, arial; color:#FF6600; font-size:12px; text-decoration:underline;}
</style>

<? $cnt_bo_1 = 5; // 한줄당 분류 갯수 ?>

<? if (!$wr_id) { ?>
<!-- 분류 셀렉트 박스 시작 -->
<?
$cnt = 1;
$sql = " SELECT bo_category_list FROM $g4[board_table] WHERE bo_table = '$bo_table' ";
$row = sql_fetch($sql);
$arr = explode("|", $row[bo_category_list]); // 구분자가 , 로 되어 있음
$str = "";
$str .= "<tr>";
for ($i=0; $i<count($arr); $i++)
if (trim($arr[$i])) {
$sql1 = " SELECT count(*) as cCount FROM $write_table WHERE ca_name = '$arr[$i]' and wr_comment >= 0 ";
$row1 = sql_fetch($sql1);
$str .= "<td height=24><img src='{$board_skin_path}/img/ico_folder.gif' width='13' height='11'>&nbsp;<a class='cate' href='./board.php?bo_table=$bo_table&sca=$arr[$i]'>$arr[$i] ($row1[cCount])</a></td>";
if ($cnt == $cnt_bo_1) { $cnt = 0; $str .= "</tr><tr>"; }
$cnt++;
}

$sql2 = " SELECT count(*) as cCount FROM $write_table WHERE wr_comment >= 0 ";
$row2 = sql_fetch($sql2);
$Total_Cat = $row2[cCount]
?>

<table width=100% cellspacing=1 cellpadding=4 border=0 style=table-layout:fixed>
<col width=100></col>
<col width=20></col>
<col width=></col>

<tr bgcolor=white>
<td width='' align='center'>
<img src='<?=$board_skin_path?>/img/ico_folder.gif' width='13' height='11'>&nbsp;<a class='cate' href='./board.php?bo_table=<?=$bo_table?>'><b>전체목록</b><br>(최근등록순)</a>
</td>
<td nowrap>&nbsp;</td>
<td width='' style='word-break:break-all;'>
<table border=0 cellspacing=0 cellpadding=0 width=100%>
<span class="cate"><?=$str?></span>
</table>
</td>
</tr>
</table>
<table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td height=1 class=line1 style=height:1px><img src=<?=$board_skin_path?>/img/tab.gif border=0 height=1></td></tr></table>
<!-- 분류 셀렉트 박스 끝 -->
<? } ?>


위파일이 스킨-보드에 _inc_category.php 내용이구요..이부분을 인쿨르드해서 사용하고 있어요
염라대왕
19년 전
wr_comment >= 0 ";



wr_comment =' 0' "; 으로 바꾸어 보시겠습니까?....

http://www.sir.co.kr/bbs/board.php?bo_table=g4_qa&wr_id=16653&sca=&sfl=mb_id%2C1&stx=vozzang

참조하세요~~~
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
19년 전 조회 1,526
19년 전 조회 1,497
19년 전 조회 1,512
19년 전 조회 1,519
19년 전 조회 1,525
19년 전 조회 1,598
19년 전 조회 1,296
19년 전 조회 1,535
19년 전 조회 1,144
19년 전 조회 1,014
19년 전 조회 1,276
19년 전 조회 1,576
19년 전 조회 1,361
19년 전 조회 1,448
19년 전 조회 1,513
19년 전 조회 1,420
19년 전 조회 1,289
19년 전 조회 1,570
19년 전 조회 1,522
19년 전 조회 1,455
🐛 버그신고