문의드립니다. > 그누4 질문답변

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!

그누4 질문답변

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

문의드립니다. 정보

문의드립니다.

본문

안녕하세요?

<?php
 function board_count($bo_table){
  $Row = sql_fetch(" select bo_count_write from g4_board where bo_table = '".$bo_table."' ");
  return $Row['bo_count_write'];
 }
 echo board_count('notice');
?>


특정 게시판 게시물 뽑기 소스입니다.


예>

임시게시판 1 총 게시글: <?php
 function board_count($bo_table){
  $Row = sql_fetch(" select bo_count_write from g4_board where bo_table = '".$bo_table."' ");
  return $Row['bo_count_write'];
 }
 echo board_count('B1');
?>

임시게시판 2 총 게시글: <?php
 function board_count($bo_table){
  $Row = sql_fetch(" select bo_count_write from g4_board where bo_table = '".$bo_table."' ");
  return $Row['bo_count_write'];
 }
 echo board_count('B2');
?>


이런식으로 페이지에 넣으니까 에러 생기네요... 1개 적용하면 되는데.. 위에처럼 두개 게시물을
뽑을려니 에러가 .... 생겨요..

방법 없을까요?

댓글 전체

이렇게 하시는 게 더 나아 보이네요.
<?php
 function board_count($bo_table){
  $Row = sql_fetch(" select bo_count_write from g4_board where bo_table = '".$bo_table."' ");
  return $Row['bo_count_write'];
 }
?>
이렇게만 해주시고.. 원하는 위치에 아래처럼

임시게시판 1 총 게시글: <? echo board_count('B1'); ?>
임시게시판 2 총 게시글: <? echo board_count('B2'); ?>
전체 66,558 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT