|
|
|
17년 전
|
조회 961
|
|
|
천하냥이
|
17년 전
|
조회 1,633
|
|
|
|
17년 전
|
조회 2,648
|
|
|
|
17년 전
|
조회 990
|
|
|
|
17년 전
|
조회 934
|
|
|
|
17년 전
|
조회 869
|
|
|
|
17년 전
|
조회 848
|
|
|
|
17년 전
|
조회 755
|
|
|
|
17년 전
|
조회 2,971
|
|
|
|
17년 전
|
조회 1,859
|
|
|
|
17년 전
|
조회 1,203
|
|
|
|
17년 전
|
조회 1,279
|
|
|
|
17년 전
|
조회 1,555
|
|
|
|
17년 전
|
조회 771
|
|
|
|
17년 전
|
조회 809
|
|
|
|
17년 전
|
조회 975
|
|
|
|
17년 전
|
조회 1,023
|
|
|
|
17년 전
|
조회 984
|
|
|
|
17년 전
|
조회 787
|
|
|
|
17년 전
|
조회 1,028
|
댓글 8개
0 로만 표시되네요..
저는 인덱스 페이지에만 표시하려구 하거든요..
$trow= sql_query( "select sum( bo_count_write) from g4_board " );
echo $trow[0];
?>
그런데 아무 숫자도 나타나지 않습니다.
아쉽네요.
다른 방법이 없을까요?
$trow= sql_fetch( "select sum(bo_count_write) as cnt from g4_board " );
echo $trow[cnt];
?>
흠....맞나...
드디어 해결을 해주시네요.
역시 그누보드를 지키는 분으로 충분합니다.
친구들에게 홈페이지 만든다고 호언장담했는데...
괜히 했나했지만, 덕분에 조금 한숨 덜었습니다.
<?=mysql_result(mysql_query("select bo_count_write from g4_board where bo_table='free'"),0,0)?>
// 전체 개시물수 구하는 방법
$board_infor = array();
$total_cnt = 0;
$total_cmt_cnt = 0;
$sql = mysql_query(" select bo_table from $g4[board_table] ");
for ($i=0; $row=mysql_fetch_array($sql); $i++) {
$board_table = $g4[write_prefix] . $row[bo_table];
$bo_row = sql_fetch(" select count(wr_id) as cnt from $board_table where wr_is_comment = 0 ");
$cmt_row = sql_fetch(" select count(wr_id) as cnt from $board_table where wr_is_comment = 1 ");
$board_infor[$i][$row[bo_table] . "_bo_cnt"] = $bo_row[cnt];
$board_infor[$i][$row[bo_table] . "_cmt_cnt"] = $cmt_row[cnt];
$total_cnt += $bo_row[cnt];
$total_cmt_cnt += $cmt_row[cnt];
}
// $total_cnt = 전체 원글수
// $total_cmt_cnt = 전체 코멘트 수
?>