오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 :
view.php 에서는
<?
$result = mysql_query("select wr_content from $write_table where wr_parent = '$wr_id' and wr_is_comment = 1 order by wr_id desc limit 1");
$row = mysql_fetch_row($result);
echo $row[0];
?>
이렇게 해서 제목옆에 호출했고요
list.php에서는
<?
$result = mysql_query("select wr_content from $write_table where wr_parent = '{$list[$i]['wr_id']}' and wr_is_comment = 1 order by wr_id desc limit 1");
$row = mysql_fetch_row($result);
echo $row[0];
?>
이렇게 해서 제목옆에 호출했는데요
latest.skin.php에서도 list.php 처럼 삽입해서 호출하려 했는데
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /localhost/skin/latest/basic/latest.skin.php on line 45
라고 에러메세지가 나옵니다.
최신글 게시판이나 리스트 게시판이나 다를게 없다고 생각했는데 latest.php에서는 호출값이 없는걸로 나오는건지요...
오류 주소 :
view.php 에서는
<?
$result = mysql_query("select wr_content from $write_table where wr_parent = '$wr_id' and wr_is_comment = 1 order by wr_id desc limit 1");
$row = mysql_fetch_row($result);
echo $row[0];
?>
이렇게 해서 제목옆에 호출했고요
list.php에서는
<?
$result = mysql_query("select wr_content from $write_table where wr_parent = '{$list[$i]['wr_id']}' and wr_is_comment = 1 order by wr_id desc limit 1");
$row = mysql_fetch_row($result);
echo $row[0];
?>
이렇게 해서 제목옆에 호출했는데요
latest.skin.php에서도 list.php 처럼 삽입해서 호출하려 했는데
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /localhost/skin/latest/basic/latest.skin.php on line 45
라고 에러메세지가 나옵니다.
최신글 게시판이나 리스트 게시판이나 다를게 없다고 생각했는데 latest.php에서는 호출값이 없는걸로 나오는건지요...
댓글 3개
mysql_fetch_row() 앞에다가 @ 를 쓰시면 오류 메시지 막을수 있구요
저라면 요렇게 사용할거 같습니다.
$query = mysql_query("select wr_content from $write_table where wr_parent = '{$list[$i]['wr_id']}' and wr_is_comment = 1 order by wr_id desc limit 1");
$result = mysql_query ($query); // 글 꺼내기
while ($data = mysql_fetch_array ($result)) {
//요런식으로 쓰면 $data 안에 배열로 나와 사용 가능
// 변수 확인
print_r2($data);
}
저는 요런식으로 쓰는게 편하더라구요
저라면 요렇게 사용할거 같습니다.
$query = mysql_query("select wr_content from $write_table where wr_parent = '{$list[$i]['wr_id']}' and wr_is_comment = 1 order by wr_id desc limit 1");
$result = mysql_query ($query); // 글 꺼내기
while ($data = mysql_fetch_array ($result)) {
//요런식으로 쓰면 $data 안에 배열로 나와 사용 가능
// 변수 확인
print_r2($data);
}
저는 요런식으로 쓰는게 편하더라구요
Warning: mysql_fetch_row(): supplied argument is not a valid
는 mysql_fetch_row() 함수가 쿼리를 실행 했을 때 쿼리문 오류로 값을 읽어올 수 없는 경우 입니다.
latest.skin.php 와 list.php와는 쓰는 방법이 다릅니다. ^^
혹시 latest skin 이 basic 이시면
(1) /lib/latest.lib.php에서
select~~ 하고요
(2) /skin/latest/basic/latest.skin.php 에서 출력합니다.
latest.skin.php 에 {$list[$i]['content']} 만 넣으면 될듯하네여~~
는 mysql_fetch_row() 함수가 쿼리를 실행 했을 때 쿼리문 오류로 값을 읽어올 수 없는 경우 입니다.
latest.skin.php 와 list.php와는 쓰는 방법이 다릅니다. ^^
혹시 latest skin 이 basic 이시면
(1) /lib/latest.lib.php에서
select~~ 하고요
(2) /skin/latest/basic/latest.skin.php 에서 출력합니다.
latest.skin.php 에 {$list[$i]['content']} 만 넣으면 될듯하네여~~
게시글 목록
| 번호 | 제목 |
|---|---|
| 284348 | |
| 284336 | |
| 284333 | |
| 284332 | |
| 284320 | |
| 284318 | |
| 284316 | |
| 284313 | |
| 284307 | |
| 284306 | |
| 284303 | |
| 284298 | |
| 284296 | |
| 284290 | |
| 284286 | |
| 284280 | |
| 284277 | |
| 284272 | |
| 284261 | |
| 284259 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기