묻고답하기

$total=mysql_num_rows($result); <- 이게 자꾸 에러가 나요.. 무슨뜻인지도 모르겠고요..ㅠ_ㅠ

에러 내용 : Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in c:apm_setupusersboardboardlist.php on line 11



<?
session_start();
include("./include/config.php");
include("./include/style.php");


$connect=mysql_connect("localhost","root","12345");
mysql_select_db("board",$connect);

$result = mysql_query("select * from $board order by re desc, tts", $connect);
$total=mysql_num_rows($result);
$page_max=15;
$page_total=ceil($total/$page_max);
$count_total=($page_num-1)*$page_max;
$uncounter=$total-(($page_num-1)*$page_max);

if(!$total) {
echo("
<html>
<head>
<meta http-equiv=Content-Type content=text/html; charset=euc-kr>
<title>Untitled Document</title>
$style
</head>
<table width=640 bordercolor=white border=0 cellspacing=2 cellpadding=0 align=center>
        <tr>
                <td colspan=5 align=right height=20 bgcolor=#8CBEF7><font size=2>
                <a href=boardwritei.php> 글쓰기 </a></font>
                </td>
        </tr>
</table>
</body>
</html>
");

}else{

echo("

<html>
<head>
<meta http-equiv=Content-Type content=text/html; charset=euc-kr>
<title>Untitled Document</title>
$style
</head>
<body bgcolor=#f4f4f4>
<table width=640 border=0 cellspacing=0 cellpadding=0 align=left>
        <tr>
                <td colspan=4 width=50 nowrap bgcolor=#f4f4f4 height=18 align=left>
                        <font size=2 color=#00008C>$total</font>
                </td>
                <td colspan=1 width=50 nowrap bgcolor=#f4f4f4 height=18 align=center>
                        <font size=2 color=#00008C>$page_num / $page_total</font>
                </td>
        </tr>
        <tr>
                <td width=640 nowrap colspan=5 bgcolor=#8CBEF7 height=20 align=center>

                <font size=4 color=white><b>Blue Free Board_1.0</b></font>
                </td>
        </tr>
        <tr>
                <td width=50 nowrap bgcolor=#C8E0FF height=18 align=center>
                        <font size=2 color=#00008C> NUM</font>
                </td>

                <td width=440 nowrap bgcolor=#C8E0FF height=18 align=center>
                        <font size=2 color=#00008C> TITLE</font>
                </td>
                <td width=50 nowrap bgcolor=#C8E0FF height=18 align=center>
                        <font size=2 color=#00008C> NAME</font>
                </td>
                <td width=50 nowrap bgcolor=#C8E0FF height=18 align=center>
                        <font size=2 color=#00008C> DATE</font>
                </td>
                <td width=50 nowrap bgcolor=#C8E0FF height=18 align=center>
                        <font size=2 color=#00008C> HIT</font>
                </td>
        </tr>
        ");

$day=mktime();
$today=date('m/d',$day);
$new="<font color=#FF5F55><sup>NEW</sup></font>";

$nbsp="   ";



for($i=0; $i<$page_max&$count_total<$total;) {
        $num=mysql_result($result, $count_total ,"num");
        $re=mysql_result($result, $count_total ,"re");
        $subject=mysql_result($result, $count_total ,"subject");
        $subject=stripslashes($subject);
        $subject =substr("$subject",0,64);
        $email=mysql_result($result,$count_total ,"email");
        $name=mysql_result($result, $count_total ,"name");
        $name =substr("$name",0,8);
        $date=mysql_result($result, $count_total ,"date");
        $click=mysql_result($result, $count_total ,"click");
        $tts=mysql_result($result, $count_total, "tts");
        $str=strlen($tts);
$tmp=time();

echo("
        <tr bgcolor=#F0F8FF  onMouseOver=this.style.backgroundColor='#DEF5FA' onMouseOut=this.style.backgroundColor=''>
                <td nowrap height=18 align=center>
                        <font size=2 color=#444444>
                        ");
                        if($UserID == $sessioncode) {
                if($UserLOGINID=="admin"){
                                echo("<a href=boarddelete.php?num=$num&page_num=$page_num&re=$re&tts=$tts>$uncounter</a>");
                        }else{
                                echo("$uncounter");
                        }
                }
                        echo("
                        </font>
                </td>
                <td nowrap height=18 align=left>
                        <font size=2 color=#444444> 
                        <a href=boardread.php?num=$num&page_num=$page_num&click=$click>
                        ");
                        for($j=1;$j<$str;$j++){
                                echo("$nbsp");
                                }
                                $k=1;
                                if($k<$str){
                                echo("↘");
                                }
                        echo("
                                ${subject}  
                         ");
                         if($today==$date){
                        echo("$new");
                        }
                        echo("
                        </a></font>
                </td>
                <td nowrap height=18 align=center>
                        <font size=2 color=#444444>
                        $name</font>
                </td>
                <td nowrap height=18 align=center>
                        <font size=2 color=#444444>$date</font>
                </td>
                <td nowrap height=18 align=center>
                        <font size=2 color=#444444>$click</font>
                </td>
        </tr>
        <tr>
                <td colspan=5 bgcolor=#C8E0FF height=1></td>
        </tr>
");




$i++;
$count_total++;
$uncounter=$uncounter-1;
}

        echo("
        <tr>
                <td colspan=5 align=center height=18 bgcolor=#C8E0FF><font size=2>
        ");

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////블럭지정 페이지 출력구문/////////////////////////////////////////////////////////////////////

$page_block=5;                               //페이지번호출력개수
$total_page=ceil($page_total/$page_block);  //총페이지수/페이지번호출력개수3개
$block=ceil($page_num/$page_block);          //현재페이지/페이지번호출력개수
$first=($block-1)*$page_block;               //시작페이지번호
$end=$block*$page_block;                    //마지막페이지번호


if($block >=$total_page){

$end=$page_total;
}

if($block >1){
$page=$first-($page_block-1);
echo("
<b><a href=boardlist.php?page_num=$page> [이전 5]</a></b>
");
}else{
echo("[이전 5]");
}

                                                  for($p_num=$first+1; $p_num <= $end; $p_num++){
                  if($p_num==$page_num){
                                                          echo("<b>[$p_num]</b>");
                  }else{
                                                          echo("<a href=boardlist.php?page_num=$p_num>[$p_num]</a>");
                                                                }
                                                                }

if($block < $total_page){

$page=$end+1;

echo("
<b><a href=boardlist.php?page_num=$page> [다음 5]</a></b>
");
}else{
echo("[다음 5]");
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



        echo("
        </font>
                </td>
        </tr>
        <tr>

                <td colspan=4 align=left height=20 bgcolor=#8CBEF7>
                <!--
                <form method=post action=boardsearch.php?page_num=$page_num>
                        <select name=search>
                        <option name=search value=sname>이름으로</option>
                        <option name=search value=ssubject>제목으로</option>
                        <option name=search value=scontent>내용으로</option>
                        <option name=search value=stotal>전체에서</option>
                        </select> 
                        <input type=text name=sfind> 
                        <input type=submit name=submit value=찾기>
                </form>
                -->
                </td>
                <td colspan=1 align=right height=20 bgcolor=#8CBEF7>
                <font size=2> <a href=boardwritei.php>글쓰기</a>  </font>
                </td>
        </tr>
        <tr>
                <td colspan=5 align=center height=18 bgcolor=#f4f4f4>$boardcopyright</td>
        </tr>

</table>
</body>
</html>


");
}
?>
글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
이온디 위젯 스킨에서 모듈 순서대로 정렬하기 [2] 2014.10.23 by 이온디
민이들 XE 기본방명록 입력폼 수정 [1] 2014.10.23 by sejin7940
야상곡 그누사용하다 xe왔습니다, 게시물 작성시 시간도 임의로 넣고싶습니다  
좋은아빠되기 로그인 후 다시 페이지 돌아오기... [6] 2014.10.23 by 좋은아빠되기
몽실아빠 레이아웃의 CSS에 포함된 내용 특정모듈에서 제외 ? [1] 2014.10.23 by 몽실아빠
bom2113 게시판 작성시 파일첨부가 되지 않아요... [1] file 2014.10.23 by 쑤유
차윰 회원가입이 안됩니다  
도로독 기존에 써놨던 글에서 썸네일 변경 하려면 어떻게 해야하죠? [1] 2014.10.23 by mindpainter
Sinn 홈페이지 관리업체에 대한 문의입니다. [2] 2014.10.23 by imagineshop
sunhoo xe를 리눅스에 설치하려고 하는데요 어떤 배포판이 가장 안정적일까요(초보입니다) [4] 2014.10.23 by sunhoo
헤헤성 404 에러 시 메인페이지로 보내는 방법! [1] 2014.10.23 by kdp
그랜드큐브 폴더 권한에 대한 질문입니다. [9] 2014.10.23 by 휘즈
Funnel centos상에서 xe 설치위치에 관한 질문합니다.. [4] file 2014.10.23 by 휘즈
그랜드큐브 멀티 도메인을 사용하니 텍스트리에 게시판 추가 설정 먹  
보소보소 게시판에 첨부파일함이 뜨지 않습니다. [2] 2014.10.23 by 보소보소
유쾌한삽질 조그만 개인 사이트에 SSL 적용 경험 나눔 [1] 2014.10.23 by 키스투엑스이
엠™ 멀티도메인 혹은 서브도메인 이용시 로그인 연동 문제... [3] 2014.10.23 by 그랜드큐브
젠장할 사용자 정의 확장변수 질문 file  
아나까떼 서브도메인간의 로그인유지, 모듈의 2차도메인연결질문 [2] 2014.10.23 by 그랜드큐브
lamb91 XE 쇼핑몰 문의 드립니다. [4] 2014.10.22 by lamb91
콩까기 최근이미지위젯중에 첨부파일/이미지링크 [3] 2014.10.22 by 휘즈
젠장할 스케치북 확장변수 리스트 수정 알려주세요. file  
이온디 위젯 스킨에서 첨부 파일이 zip 파일인지 이미지 파일인지 체크할 수 있나요?  
sam95 메인에서 사진클릭하면 원하는 사이트로 이동하게 하는 방법 궁금합니다. [1] 2014.10.22 by GG
대한민국대표찌질이 지금 XE를 공부하고 있는데요... 모듈아이디에 대해 의문점이 있어서... [1] 2014.10.22 by GG
대한민국대표찌질이 저기 xe기본 레이아웃 과 slrclub의 처음화면에서... [6] 2014.10.22 by 대한민국대표찌질이
richardhj 스케치북 글작성후 조회하면 메인페이지가 본문에 들어가있습니다. [1] file 2014.10.22 by richardhj
노에르 XE404 에러 페이지 변경은 어떻게 하나요?! [2] file 2014.10.22 by 노에르
초가을 xe 메인페이지 로그인이 안돼요. [1] 2014.10.22 by 하한만
이온디 슬라이드 토글 제이쿼리인데 두 개 차이를 좀 알려주실 수 있나요? [6] 2014.10.22 by 이온디