코멘트 출력 다시문의드립니다. 정보
코멘트 출력 다시문의드립니다.본문
앞서 질문한내용인데요
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) 이렇게 출력 하면 코멘트가 나옵니다.
여기서 코멘트가 없을때는 예를 들어 "코멘트가 없음" 이라고 출력하려면 어떻게 하면 되지요?
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) 이렇게 출력 하면 코멘트가 나옵니다.
여기서 코멘트가 없을때는 예를 들어 "코멘트가 없음" 이라고 출력하려면 어떻게 하면 되지요?
댓글 전체

$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]:"코멘트없음"; 으로 해봤는데 안 나오네요
그래서 아래의 $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] = "코멘트없음"; 이부분을 추가 하니 되네요^^
{
$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] = "코멘트없음"; 이부분을 추가 하니 되네요^^