[G5] 그누보드에서 G4S로 이전시 첨부파일 출력 업데이트

그누보드에서 G4S로 이전시 첨부파일 출력 업데이트

<?php
include_once('./_common.php'); 

if(!$is_admin) { 
exit; 
}
 
$bo_table = ""; 
$sql = " select bo_table from $g4[board_table]"; 
$result = sql_query($sql); 

for ($i=0; $row=sql_fetch_array($result); $i++) { 
$result_file = sql_query("select distinct(wr_id) from $g4[board_file_table] where bo_table='$row[bo_table]'"); 

for($j=0;$res=sql_fetch_array($result_file);$j++) { 
$file_cnt = sql_fetch("select count(*) as cnt from $g4[board_file_table] where bo_table='$row[bo_table]' and wr_id='$res[wr_id]'"); 
$bo_table = $g4['write_prefix'] . $row[bo_table]; 
sql_query("update $bo_table set wr_file='$file_cnt[cnt]' where wr_id='$res[wr_id]'"); 
}
 
echo "wr_file 필드에 파일수를 업데이트 하였습니다."; 

?>

1 2 3 4 다음 맨끝
글쓰기