묻고답하기

$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 남기남
유이 노프레임에서 테이블이 망가지네요.. [1] 2007.08.10
초보무시마세요 플레쉬에서 포토샵 style 불러올수 없나요??? [2] 2007.08.10
꾸러기^^ 이사이트에있는 메일로그인서비스....  
jjaekim xp에서 아파치 2.0.47 과 , php-5.0.0b1 을 설치중인데 php4apache2.dll 를 못찾아요 [1] 2007.08.10
백승우 이미지 분류 [2] 2007.08.10
최승철 2000에 APM을 설치했는데 FTP는 어케 설치하나요? [5] 2007.08.10
카르미나부라나 다른이름으로 저장했을 때, 다르게 보이도록 하는 법은? [3] 2007.08.10
섬김이 두개의 프레임 작동문제 [2] 2007.08.10
[소닉]아르노 플래시질문..  
Patⓡiⓒk iframe.. 짜증나게 느려지는데.. [1] 2007.08.10
카카시원츄 최근 게시물 스타일 시트에서 마우스대면 배경색이 변하는 롤오버는.... [2] 2007.08.10
천성호 글씨가 이상하게 나와요.ㅠ,ㅠ[사진참조] [2] 2007.08.10
손영환 노프레임 만들기(제로보드) [4] 2007.08.10
이현정 이 에러가 머예요??  
도연 포토샵에서 [2] 2007.08.10
스카치 스크롤바가 안먹혀요! [1] 2007.08.10
®웃^음^이® 아아.. 어떻게 스크립트 짜야 할지 망막하네 좀 알려주세요. [2] 2007.08.10
양부장 DB접속시 에러 발생에 관해... [2] 2007.08.10
Maie君 플래시 음악관련 질문.  
mousepad 세로로 선긋기는 어떻게 하나요? [3] 2007.08.10
guangchun PHPMYADMIN로그인이안돼는데요? [2] 2007.08.10
오오사카 포토샵 단축키 질문 [3] 2007.08.10
이경희 플래시가 웹상에서 안떠요.. [2] 2007.08.10
홍승택 인터넷 속도에 따라서 일일트래픽이 달라지나요?  
정춘국 웹페이지 저장이 안되어서..  
김영찬 검색창에서 한글을 입력하고 나온 결과를 보려고 클릭하면 내부에러가... [1] 2007.08.10
이재한 스크롤바 오토시... [2] 2007.08.10
김경민 노프레임 질문입니다.  
김동선 플래쉬에서 책장이 넘어가는 효과... [1] 2007.08.10
최경준 php에서 쌍따옴표 붙이기... [1] 2007.08.10