게시물 삭제 소스가
/bbs/delete.php
sql_query(" update {$g5['board_table']} set bo_count_write = bo_count_write - '$count_write', bo_count_comment = bo_count_comment - '$count_comment' where bo_table = '$bo_table' ");
이런식으로 되어 있어서 게시물 삭제시에 정상적으로 게시물 카운팅이 되지 않더군요
이건 mysql 5.1 이상에서만 발생하는 버그 입니다.
변경해 주셔야 합니다.
->
//상단에 변수를 설정해 주시고,
$count_write = 0;
$count_comment = 0;
if ($is_admin == 'super') // 최고관리자 통과
;
//삭제코드를 이렇게 변경해 주시면 됩니다.
sql_query(" update $g5[board_table] set bo_count_write = bo_count_write - $count_write, bo_count_comment = bo_count_comment - $count_comment where bo_table = '$bo_table' ");
마찬가지로
/bbs/delete_all.php
/bbs/new_delete.php 도 변경해 주시면
정상적으로 게시물 카운팅이 됩니다.
/bbs/delete.php
sql_query(" update {$g5['board_table']} set bo_count_write = bo_count_write - '$count_write', bo_count_comment = bo_count_comment - '$count_comment' where bo_table = '$bo_table' ");
이런식으로 되어 있어서 게시물 삭제시에 정상적으로 게시물 카운팅이 되지 않더군요
이건 mysql 5.1 이상에서만 발생하는 버그 입니다.
변경해 주셔야 합니다.
->
//상단에 변수를 설정해 주시고,
$count_write = 0;
$count_comment = 0;
if ($is_admin == 'super') // 최고관리자 통과
;
//삭제코드를 이렇게 변경해 주시면 됩니다.
sql_query(" update $g5[board_table] set bo_count_write = bo_count_write - $count_write, bo_count_comment = bo_count_comment - $count_comment where bo_table = '$bo_table' ");
마찬가지로
/bbs/delete_all.php
/bbs/new_delete.php 도 변경해 주시면
정상적으로 게시물 카운팅이 됩니다.
게시글 목록
| 번호 | 제목 |
|---|---|
| 24318 | |
| 24317 | |
| 24315 | |
| 24309 | |
| 24294 | |
| 24293 | |
| 24277 | |
| 24262 | |
| 24260 | |
| 24253 | |
| 24251 | |
| 24236 | |
| 24233 | |
| 24228 | |
| 24226 | |
| 24221 | |
| 24214 | |
| 24203 | |
| 24201 | |
| 24199 | |
| 24196 | |
| 24195 | |
| 24194 | |
| 24192 | |
| 24191 | |
| 24187 | |
| 24185 | |
| 24183 | |
| 24172 | |
| 24168 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기