특정 조건에 따른 아이콘을 출력하고싶습니다. 정보
특정 조건에 따른 아이콘을 출력하고싶습니다.본문
글쓴이의 글수 댓글수를
$sql = " select count(*) as cnt from $g4[board_new_table] where mb_id = '{$view['mb_id']}' and wr_id = wr_parent ";
$row = sql_fetch($sql);
$post_cnt = $row['cnt'];
// 내가 쓴 전체 코멘트 (new 테이블 기록)
$sql2 = " select count(*) as cnt from $g4[board_new_table] where mb_id = '{$view['mb_id']}' and wr_id != wr_parent ";
$row2 = sql_fetch($sql2);
$cmt_cnt = $row2['cnt']; // mb_id가 쓴 코멘트 갯수
이렇게 뽑아오고 있습니다.
여기서 글쓴이의 글 수가 20개 이상이 되면 /images/2.gif 라는 아이콘을 출력해주고 싶습니다.
$sql = " select count(*) as cnt from $g4[board_new_table] where mb_id = '{$view['mb_id']}' and wr_id = wr_parent ";
$row = sql_fetch($sql);
$post_cnt = $row['cnt'];
// 내가 쓴 전체 코멘트 (new 테이블 기록)
$sql2 = " select count(*) as cnt from $g4[board_new_table] where mb_id = '{$view['mb_id']}' and wr_id != wr_parent ";
$row2 = sql_fetch($sql2);
$cmt_cnt = $row2['cnt']; // mb_id가 쓴 코멘트 갯수
이렇게 뽑아오고 있습니다.
여기서 글쓴이의 글 수가 20개 이상이 되면 /images/2.gif 라는 아이콘을 출력해주고 싶습니다.
댓글 전체

if ($cmt_cnt >= 20)
echo "/images/2.gif";
라고 하면 끝나지 않을까요 :)
echo "/images/2.gif";
라고 하면 끝나지 않을까요 :)