게시판 공부를 하고 있는데 에러가 뜹니다 근데 모르겠어요

· 15년 전 · 1254 · 3
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in C:\APM_Setup\htdocs\list.php on line 16


Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\APM_Setup\htdocs\list.php on line 43

이렇게 오류가 나는데 왜 오류가 나는지 모르겠습니다 책을 보면서 연습 하고 있는데요~

====================================================================================
<?
include"db_info.php";
?>

<?
$page_size=10; //한페이지에 보여질 게시물의 수

$page_list_size = 10;

if (!$no || $no < 0) $no=0; //데이터베이스에서 페이지의 첫번째 글($no)부터

$query ="SELECT * FROM board ORDER BY id DESC LIMIT $no, $page_size";//DB를 가져오는 쿼리
$result = mysql_query($query, $conn);

$result_count=mysql_query("SELECT count (*) FROM kang", $conn);
$result_row=mysql_fetch_row($result_count);<<<<<<<<<<<이부분
$total_row = $result_row[0];

if (total_row <= 0) $total_row = 0;
$total_page = ceil($total_row / $page_size);//총페이지 계산

$current_page = ceil(($no+1)/ $page_size);//현재페이지 계산
?>
<body>
<center>
<br>
<table align=center style="width:500px;height:50px;border:3px #CCCCCC solid;">
<tr align=center style="width:500px;height:50px;border:3px #CCCCCC solid;">
<td align=center style="width:500px;height:50px;border:3px #CCCCCC solid;">
<font>번호</font>
</td>
<td align=center style="width:500px;height:50px;border:3px #CCCCCC solid;">
<font>제목</font>
</td>
<td align=center style="width:500px;height:50px;border:3px #CCCCCC solid;">
<font>이름</font>
</td>
<td align=center style="width:500px;height:50px;border:3px #CCCCCC solid;">
<font>날짜</font>
</td>
</tr>
<?
while($row=mysql_fetch_array($resuly))<<<<<<<<<<이부분
{
?>

<tr>
<td align=center style="width:500px;height:50px;border:3px #CCCCCC solid;">
<a href="read.php? id=<?$row[id]?> & no=<?=$no?>">
<?=$row[id]?></a>
</td>

<td align=center style="width:500px;height:50px;border:3px #CCCCCC solid;">
<a href="read.php?id=?=<?$row[id]?>&no=<?=$no?>">
<?=strip_tags($row[title], '<i>');?></a>
</td>

<td align=center style="width:500px;height:50px;border:3px #CCCCCC solid;">
<font>
<a href="mailto:<?=$row[email]?>"><?$row[gname]?></a>
</font>
</td>
<td>
<font><?$row[wdate]?></font>
</td>
</tr>

<?
}//end wgile


?>
</table>

<table>
<tr>
<td>
<font>
<?
$start_page = floor((current_page-1) / $page_list_size) * $page_list_size + 1;

$end_page = $start_page + $page_list_size - 1;

if($total_page < $end_page) $end_page = $total_page;
if($start_page >= $page_list_size){

$prec_list = ($start_page - 2)* $page_size;
echo "<a href= \"$PHP_SELF?no=$prev_lost\">◀</a>/n";

for($i=$start_page;$i <= $end_page;$i++) {
$page= ($i-1) * $page_size;
if ($no!=$page){
echo"<a href=\"$PHP_SELF? no=$page\">";
}

echo"</a>";
}
}

if($total_lage > $end-page)
{
$next_lost = $end_page * $page_size;
echo "<a href=$PHP_SELF?no=$next_list>▶</a><p>";
}
?>
<font>
<td>
<tr>
</table>
<a href=write.php>글쓰기</a>
</center>
</body>
|

댓글 3개

좀 가르쳐 주세요 @ 이렇게 붙이면 오류를 무시 하는거라고 하던데 하면 출력이 안되네요 ㅠ
phpschool.com 가셔서 글올려보세요
배우실때 도움 많이됩니다
도움이 되실런지는 모르지만^^
그누보드에서 사용하는게아니고 다른보드용(제로..)에서 사용하든 소스인것같네요?

mysql_query => sql_query
mysql_fetch_row => sql_fetch
mysql_fetch_array => sql_fetch_array

common.lib.php에 SQL 관련 함수화 되어있습니다.
수정해서 함해보세요.
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
15년 전 조회 2,302
15년 전 조회 1,657
15년 전 조회 1,501
15년 전 조회 1,650
15년 전 조회 1,272
15년 전 조회 1,156
15년 전 조회 1,190
15년 전 조회 2,143
15년 전 조회 1,579
15년 전 조회 1,255
15년 전 조회 1,609
15년 전 조회 1,421
15년 전 조회 1,536
15년 전 조회 1,714
15년 전 조회 2,013
15년 전 조회 946
15년 전 조회 1,517
15년 전 조회 1,206
15년 전 조회 1,502
15년 전 조회 980
🐛 버그신고