sql 쿼리 오류입니다..좀 봐주세효

<?
$db=mysql_connect("localhost","datacamp","320103");
mysql_select_db("datacamp",$db);
$result=mysql_query("select * from gb_write_freeboard order by gr_id, bo_table ", $db);
for ($i=0; $row=mysql_fetch_array($result); $i++) {
echo "<table width=100% border=0 cellpadding=1 cellspacing=0 class=tablebg>";
echo "<tr><td height=25>  <a href='../board/gnu/bbs/gnuboard.php?bo_table=$row[bo_table]'><b><font color=555555>$row[bo_subject]</font></b></a></td></tr>";
echo "<tr><td>";
latest('', $row[bo_table], 5, 35);
echo "</td></tr></table><p>";
}
mysql_close($db);
?>

이런 에러가 납니다.. 어디가 잘못돼었나요?
Warning: Supplied argument is not a valid MySQL result resource
|

댓글 1개

select * from gb_write_freeboard order by gr_id, bo_table
위의 쿼리로 결과가 하나도 없을때 위와 같은 오류가 납니다.

$result=@mysql_query("select * from gb_write_freeboard order by gr_id, bo_table ", $db);
Warning 오류를 무시하세요.
댓글을 작성하시려면 로그인이 필요합니다.

그누3질답

+
제목 글쓴이 날짜 조회
22년 전 조회 817
22년 전 조회 757
22년 전 조회 796
22년 전 조회 955
이너몰
22년 전 조회 817
22년 전 조회 890
22년 전 조회 781
22년 전 조회 916
22년 전 조회 839
22년 전 조회 795
22년 전 조회 1,224
22년 전 조회 733
22년 전 조회 1,130
22년 전 조회 810
22년 전 조회 742
22년 전 조회 730
22년 전 조회 641
22년 전 조회 803
22년 전 조회 768
22년 전 조회 702