<?
/* 게시글삭제시 댓글 첨부파일 처리 */

$sql = " select wr_id, mb_id, wr_is_comment from $write_table where wr_parent = '$write[wr_id]' and wr_is_comment = 1 ";
$result = sql_query($sql);
while ($row = sql_fetch_array($result)) 
{


        $sql2 = " select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$row[wr_id]' ";
        $row2 = sql_fetch($sql2);
        
        @unlink("$g4[path]/data/file/$bo_table/$row2[bf_file]");
            
}
                   
?>