특정게시판 등록글수 나오게하는방법
본문
특정게시판 등록글수 나오게하는방법..
<?php echo
$bo_other=' 테이블명'; list( $ccnt)=mysql_fetch_row( mysql_query( "select bo_count_write from g5_board where bo_table='$bo_other' ")); echo $ccnt;
?>
4버전에서는 이렇게 하면 됬었는데요
5버전에서는 앞에 테이블명이 나오네요
어떻게 수정해야 하나요
답변 2
그누4에서도 현재 내용만으로는 동작이 안되었을 텐데요???
<?php
$connect = mysql_connect("localhost", "데이터베이스 아이디", "데이터베이스 비밀번호");
$mysql = mysql_select_db("데이터베이스 명", $connect);
$bo_other = '불러올 게시판 아이디';
$result = mysql_query(" select bo_count_write from g5_board where bo_table='$bo_other' ", $connect);
$data = mysql_fetch_array($result);
echo $data[bo_count_write];
?>
와 같이 해 보세요.
!-->간단하게요..
상단에 그누보드 _command 가 인클루드 되어있을경우
$row = sql_fetch(" select bo_count_write from g5_board where bo_table='$bo_other' ")
echo $row[bo_count_write];
이렇게 딱 2줄이면 해결됩니다.
답변을 작성하시기 전에 로그인 해주세요.