sql 퀴리문 코멘트는 빼고는 어떻게 하나요?

sql 퀴리문 코멘트는 빼고는 어떻게 하나요?

QA

sql 퀴리문 코멘트는 빼고는 어떻게 하나요?

본문

새로운 글이 올라오면 뉴 아이콘이 나타나는데 코멘트는 빼고는 어떻게 수정을 해야 하나요 ?

 


<? // 소메뉴 new 표시
$smalls = mw_get_small_menus($mw_mmenus[$i][mm_id]); 
$smalls_count = count($smalls); 
for ($j=0; $j<$smalls_count; $j++) { 
 
$new_datetime = date("Y-m-d H:i:s", $g4[server_time] - (60*60)); // 한시간 
$new_datetime = date("Y-m-d H:i:s", $g4[server_time] - (60*60*24)); // 24시간 
if ($smalls[$j][bo_table]) {
    $sql = "select count(wr_id) as cnt from $g4[write_prefix]{$smalls[$j][bo_table]} where wr_is_comment > -1 and ca_name = '{$smalls[$j][ca_name]}' and wr_datetime > '$new_datetime'";
    $row = sql_fetch($sql); 
}
 
if ($row[cnt]) { 
    $icon_new = "<img src='$g4[path]/bbs/img/comsub//com_new.gif'>"; // new 아이콘 
} else { 
    $icon_new = ""; 
}
// new 끝 
?> 

이 질문에 댓글 쓰기 :

답변 2

$sql "select count(wr_id) as cnt from $g4[write_prefix]{$smalls[$j][bo_table]} where wr_is_comment <> '1' and ca_name = '{$smalls[$j][ca_name]}' and wr_datetime > '$new_datetime'";

$sql "select count(wr_id) as cnt from $g4[write_prefix]{$smalls[$j][bo_table]} where wr_is_comment > -1 and ca_name = '{$smalls[$j][ca_name]}' and wr_datetime > '$new_datetime'";

 

여기에  and wr_is_comment​ = 0

을 추가하시면 될것 같습니다.

답변을 작성하시기 전에 로그인 해주세요.
전체 12
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT