인기다운랭킹 팁중 질문~ 정보
인기다운랭킹 팁중 질문~본문
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=79720&sca=&sfl=wr_subject&stx=%B7%A9%C5%B7&sop=and
위에 팁을 사용하려고 하는데 오류가 생깁니다.
오류내용
Fatal error: Call to undefined function sql_query() in /chroot/home/pupu/bbs/downloadrank.php on line 17
원본소스
====================================================================================
<style>
*#mbox2{margin:2px;width:484px;height:342px;border:solid 5px #D7D7D7;padding:4px;}}/*파폭전용*/
#mbox2{margin:2px;width:500px;height:320px;border:solid 5px #D7D7D7;padding:4px;}/*익스전용*/
</style>
<div id="mbox2">
<div style="padding:8px;"><img src="<?=$g4[path]?>/image/pds/downloadrank.gif"></div>
<div style="width:30px;float:left;margin:6px;text-align:center;">순위</div>
<div style="float:left;margin:6px;">자료명</div>
<div style="width:40px;float:right;margin:6px;">조회수</div>
<div style="width:80px;float:right;margin:6px;">다운로드횟수</div>
<div style="height:1px; line-height:1px; font-size:1px; background-color:#D7D7D7; clear:both;"> </div>
<?
$sql="select * from g4_board_file where bo_table='B34' or bo_table='B35' or bo_table='B37' or bo_table='B38' order by bf_download desc limit 10";
$result = sql_query($sql);
$ranking=0;
while($bf_rank = mysql_fetch_array($result))
{
$sql2="select * from g4_write_$bf_rank[bo_table] where wr_id='$bf_rank[wr_id]'";
$result2 = sql_query($sql2);
while($rank=mysql_fetch_array($result2))
{?>
<div style="width:30px;float:left;margin:6px;text-align:center;"><img src=<?=$g4[path]?>/image/rank/btn_<?=$ranking?>.gif></div>
<div style="float:left;margin:6px;"><a href=<?=$g4[path]?>/bbs/board.php?bo_table=<?=$bf_rank[bo_table]?>&wr_id=<?=$rank[wr_id]?>><?=$rank[wr_subject]?></a></div>
<div style="width:40px;float:right;margin:6px;text-align:center;"><?=$rank[wr_hit]?></div>
<div style="width:80px;float:right;margin:6px;text-align:center;"><?=$bf_rank[bf_download]?></div>
<div style="height:1px; line-height:1px; font-size:1px; background-color:#D7D7D7; clear:both;"> </div>
<?$ranking++;}?><?}?>
</div>
무엇이 문제일까요? ㅠ_-
위에 팁을 사용하려고 하는데 오류가 생깁니다.
오류내용
Fatal error: Call to undefined function sql_query() in /chroot/home/pupu/bbs/downloadrank.php on line 17
원본소스
====================================================================================
<style>
*#mbox2{margin:2px;width:484px;height:342px;border:solid 5px #D7D7D7;padding:4px;}}/*파폭전용*/
#mbox2{margin:2px;width:500px;height:320px;border:solid 5px #D7D7D7;padding:4px;}/*익스전용*/
</style>
<div id="mbox2">
<div style="padding:8px;"><img src="<?=$g4[path]?>/image/pds/downloadrank.gif"></div>
<div style="width:30px;float:left;margin:6px;text-align:center;">순위</div>
<div style="float:left;margin:6px;">자료명</div>
<div style="width:40px;float:right;margin:6px;">조회수</div>
<div style="width:80px;float:right;margin:6px;">다운로드횟수</div>
<div style="height:1px; line-height:1px; font-size:1px; background-color:#D7D7D7; clear:both;"> </div>
<?
$sql="select * from g4_board_file where bo_table='B34' or bo_table='B35' or bo_table='B37' or bo_table='B38' order by bf_download desc limit 10";
$result = sql_query($sql);
$ranking=0;
while($bf_rank = mysql_fetch_array($result))
{
$sql2="select * from g4_write_$bf_rank[bo_table] where wr_id='$bf_rank[wr_id]'";
$result2 = sql_query($sql2);
while($rank=mysql_fetch_array($result2))
{?>
<div style="width:30px;float:left;margin:6px;text-align:center;"><img src=<?=$g4[path]?>/image/rank/btn_<?=$ranking?>.gif></div>
<div style="float:left;margin:6px;"><a href=<?=$g4[path]?>/bbs/board.php?bo_table=<?=$bf_rank[bo_table]?>&wr_id=<?=$rank[wr_id]?>><?=$rank[wr_subject]?></a></div>
<div style="width:40px;float:right;margin:6px;text-align:center;"><?=$rank[wr_hit]?></div>
<div style="width:80px;float:right;margin:6px;text-align:center;"><?=$bf_rank[bf_download]?></div>
<div style="height:1px; line-height:1px; font-size:1px; background-color:#D7D7D7; clear:both;"> </div>
<?$ranking++;}?><?}?>
</div>
무엇이 문제일까요? ㅠ_-
댓글 전체
저 파일을 그대로 브라우저에서 여신게 아닌지요?
그누보드 라이브러리가 있는 페이지에 include 시켜서 사용하셔야 합니다.
그누보드 라이브러리가 있는 페이지에 include 시켜서 사용하셔야 합니다.
아하하~ 제가 그걸 잊었군요 ㅎㅎㅎ 감사합니다 ^^ㅎㅎ