sql 퀴리문 코멘트는 빼고는 어떻게 하나요? 채택완료
아스널
11년 전
조회 2,559
새로운 글이 올라오면 뉴 아이콘이 나타나는데 코멘트는 빼고는 어떻게 수정을 해야 하나요 ?
</p><p><? // 소메뉴 new 표시</p><p>$smalls = mw_get_small_menus($mw_mmenus[$i][mm_id]); </p><p>$smalls_count = count($smalls); </p><p>for ($j=0; $j<$smalls_count; $j++) { </p><p> </p><p>$new_datetime = date("Y-m-d H:i:s", $g4[server_time] - (60*60)); // 한시간 </p><p>$new_datetime = date("Y-m-d H:i:s", $g4[server_time] - (60*60*24)); // 24시간 </p><p>if ($smalls[$j][bo_table]) {</p><p> $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'";</p><p> $row = sql_fetch($sql); </p><p>}</p><p> </p><p>if ($row[cnt]) { </p><p> $icon_new = "<img src='$g4[path]/bbs/img/comsub//com_new.gif'>"; // new 아이콘 </p><p>} else { </p><p> $icon_new = ""; </p><p>}</p><p>// new 끝 </p><p>?> </p><p>
댓글을 작성하려면 로그인이 필요합니다.
답변 2개
채택된 답변
+20 포인트
11년 전
$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'";
로그인 후 평가할 수 있습니다
답변에 대한 댓글 1개
�
아스널
11년 전
댓글을 작성하려면 로그인이 필요합니다.
11년 전
$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
을 추가하시면 될것 같습니다.
로그인 후 평가할 수 있습니다
답변에 대한 댓글 1개
�
아스널
11년 전
오류가 납니다. ㅠ
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
Parse error: syntax error, unexpected T_VARIABLE in /home/hosting_users/maxtestpage/www/skin/mw.builder/mw.basic.3/com_menu.php on line 66