m

총게시물 수, 총 댓글수 뽑기

<? 
//게시물수 뽑기
 $results1 = sql_query(" SELECT bo_table FROM $g4[board_table] ");
 
  $all_com = 0;
   $all_art= 0;
   $i=0;
     while ($row13 = sql_fetch_array($results1)) {
    
 $i++; //테이블수
    //게시물
    $gul_su="select count(wr_is_comment) as ctt from g4_write_$row13[bo_table] where wr_is_comment='0' ";
    
    //코멘트
    $co_su="select sum(wr_is_comment) as ctt2 from g4_write_$row13[bo_table] where wr_is_comment='1' "; 
    //게시물
    $article = sql_fetch($gul_su);
    $article_su=$article[ctt];
    $all_art= $all_art +$article_su;
    
    //코멘트
    $comm= sql_fetch($co_su);
    $comm_su=$comm[ctt2];
    $all_com = $all_com+$comm_su;
 }


?>


<table width=100%>
        <tr>
         <td align=right>
          <span  style='font-family:돋움;font-size:11px;color:#999999;'>· 총게시물 :</span></td>
         <td align=right>&nbsp;<span style='font-family:돋움;font-size:11px;color:#999999;'>
           <?=number_format($all_art)?>&nbsp;</span></td>
         <td align=right>
          <span  style='font-family:돋움;font-size:11px;color:#999999;'>· 총코멘트 :</span> </td>
          <td align=right>&nbsp;
            <span style='font-family:돋움;font-size:11px;color:#999999;'>
             <?=number_format($all_com)?>&nbsp;</span></td>
         </tr>
 </table>
|

댓글 2개

요게 각 회원들이 작성한 총 게시물과 코멘트를 출력하는 소스인가요?
정말 유용한팁!
감사합니다~~~~~
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 팁자료실

그누보드4와 관련된 팁을 여러분들과 함께 공유하세요. 나누면 즐거움이 커집니다.

+
제목 글쓴이 날짜 조회
18년 전 조회 1.1만
18년 전 조회 5,598
18년 전 조회 4,964
18년 전 조회 3,754
18년 전 조회 3,089
18년 전 조회 3,226
18년 전 조회 3,035
18년 전 조회 7,951
18년 전 조회 5,540
18년 전 조회 3,559
18년 전 조회 5,763
18년 전 조회 7,832
18년 전 조회 3,434
18년 전 조회 3,190
18년 전 조회 5,322
18년 전 조회 4,944
18년 전 조회 4,968
18년 전 조회 1.2만
18년 전 조회 4,430
18년 전 조회 2,943
🐛 버그신고