문의드립니다. 정보
문의드립니다.본문
안녕하세요?
<?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'];
}
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개 적용하면 되는데.. 위에처럼 두개 게시물을
뽑을려니 에러가 .... 생겨요..
방법 없을까요?
Fatal error: Uncaught TypeError: mysqli_fetch_assoc(): Argument #1 ($result) must be of type mysqli_result, null given in /home/kagla/new-sir/old/lib/common.lib.php:2339 Stack trace: #0 /home/kagla/new-sir/old/lib/common.lib.php(2339): mysqli_fetch_assoc() #1 /home/kagla/new-sir/old/skin/board/v16/view.skin.php(795): sql_fetch_array() #2 /home/kagla/new-sir/old/bbs/view.php(403): include_once('...') #3 /home/kagla/new-sir/old/bbs/board.php(300): include_once('...') #4 {main} thrown in /home/kagla/new-sir/old/lib/common.lib.php on line 2339