오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 :
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']} 만 넣으면 될듯하네여~~
게시글 목록
| 번호 | 제목 |
|---|---|
| 284255 | |
| 284248 | |
| 284247 | |
| 284246 | |
| 284242 | |
| 284238 | |
| 284234 | |
| 284233 | |
| 284229 | |
| 284224 | |
| 284222 | |
| 284215 | |
| 284213 | |
| 284212 | |
| 284209 | |
| 284208 | |
| 284201 | |
| 284193 | |
| 284192 | |
| 284174 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기