세

코멘트 출력 다시문의드립니다.

· 2013-04-11 (목) 14:45:30 · 1046 · 3
앞서 질문한내용인데요

bbs/new.php 에서 아래와 같이 고치고 난다음
------------------------------------------------------------------------------------------------

}else{ // 코멘트

$comment = "[코] ";

$comment_link = "#c_{$row['wr_id']}";

$row2 = sql_fetch(" select * from $tmp_write_table where wr_id = '{$row['wr_parent']}' ");

$row3 = sql_fetch(" select mb_id, wr_name, wr_email, wr_homepage, wr_datetime,wr_content from $tmp_write_table where wr_id = '{$row['wr_id']}' ");

$list[$i] = $row2;

$list[$i]['mb_id'] = $row3['mb_id'];

$list[$i]['wr_name'] = $row3['wr_name'];

$list[$i]['wr_email'] = $row3['wr_email'];

$list[$i]['wr_homepage'] = $row3['wr_homepage'];

$list[$i]['co_content2'] = $row3['wr_content'];
------------------------------------------------------------------------------------------------

이렇게 수정하고

그리고 new.skin.php페이지는
conv_content($list[$i]['co_content2'],1) 이렇게 출력 하면 코멘트가 나옵니다.

여기서 코멘트가 없을때는 예를 들어 "코멘트가 없음" 이라고 출력하려면 어떻게 하면 되지요?

댓글 3개

$list[$i]['co_content2'] = $row3['wr_content']?$row3['wr_content']:"코멘트없음";
이렇게 하심 됩니다
conv_content($list[$i]['co_content2'],1) <-이렇게 하면 안되고 {$list[$i][co_content2]} <- 이렇게 하니까 나오네요 ^^;;
그래서 아래의 $list[$i]['co_content2'] = $row3['wr_content']?$row3['wr_content']:"코멘트없음"; <-이부분은 $list[$i][co_content2] = $row3[wr_content]?$row3[wr_content]:"코멘트없음"; 으로 해봤는데 안 나오네요
if ($row[wr_id] == $row[wr_parent]) // 원글
{
$comment = "";
$comment_link = "";
$row2 = sql_fetch(" select * from $tmp_write_table where wr_id = '$row[wr_id]' ");
$list[$i] = $row2;
$list[$i][co_content2] = "코멘트없음";


--------------------------------
윗부분에 $list[$i][co_content2] = "코멘트없음"; 이부분을 추가 하니 되네요^^
댓글을 작성하시려면 로그인이 필요합니다.

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

+
제목 글쓴이 날짜 조회
13-04-11 조회 977
13-04-11 조회 1,092
13-04-11 조회 880
13-04-11 조회 1,324
13-04-11 조회 805
13-04-11 조회 755
13-04-11 조회 1,995
13-04-11 조회 1,715
13-04-11 조회 1,047
13-04-11 조회 1,877
13-04-11 조회 1,756
13-04-11 조회 2,307
13-04-11 조회 1,718
13-04-11 조회 1,565
13-04-11 조회 1,188
13-04-11 조회 1,151
13-04-11 조회 1,739
13-04-11 조회 1,672
13-04-11 조회 1,308
13-04-11 조회 1,685