코멘트관련.. 약간만 고쳐주시면 돼요 부탁드립니당 > 그누4 질문답변

그누4 질문답변

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

코멘트관련.. 약간만 고쳐주시면 돼요 부탁드립니당 정보

코멘트관련.. 약간만 고쳐주시면 돼요 부탁드립니당

본문

목록에서 코멘트 갯수 불러오는 코드가 {$list[$i][wr_comment]} 잖아요.
갯수 옆에 가장 최근 댓글작성자 닉네임까지 뽑아내려고요.
[15:최고관리자] <- 이런식으로.

<?
$tbl = "{$g4[write_prefix]}{$bo_table}";
$sql = " select *
from $tbl where wr_parent ='{$list[$i][wr_id]}' and wr_is_comment = '1'
order by wr_datetime desc";
$result = sql_query($sql);
for ($c = 0; $row = mysql_fetch_array($result); $c++) {
echo "<b>$row[wr_name]</b>";
if($c == '0')
break;
}
?>

위 소스가 최근 댓글작성자 닉네임을 불러오는 소스인데요.
이게 너무 길어서 제목 옆에 넣으면 복잡해지니까..

list.skin 파일에서
{$list[$i][wr_comment]} 이 함수 안에 최근댓글작성자 닉네임을 불러오는 소스를 포함시켜서 상단에서 정리를 하고
중간쯤 제목 옆에 {$list[$i][wr_comment]} 이것만 넣어도 [15:최고관리자] 이런식으로 출력이 되게끔 수정해주시면 감사하겠습니다.
  • 복사

( select a.* , ( select sum(co_count) as co_count from g4_qa_choose where mb_id=a.mb_id and bo_table = 'g4_qa' ) as q_co_count from `g4_write_g4_qa` a where wr_parent = '228143' and wr_8 != '' and wr_is_comment = 1 and CONVERT(wr_7, UNSIGNED) >= 5 group by wr_content having max(wr_7) order by CONVERT(wr_7, UNSIGNED) desc limit 3 )

1055 : Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'sir.a.wr_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

error file : /15sir/bbs/board.php