답변 3개
참고만 해 보세요.
$sql="select count(*) as cnt from `{$g5['board_table']}`"; $res=sql_fetch($sql); $b_count=(int)$res['cnt'];
$b_qry="select bo_table,bo_subject from `{$g5['board_table']}`"; $b_result=sql_query($b_qry);
$j=1; for($i=0; $row=sql_fetch_array($b_result); $i++) { $b_count_qry="select count(*) as cnt from ". $g5['write_prefix'].$row['bo_table']; $b_count_qry .=" where wr_is_comment='0'"; $b_count_result=sql_query($b_count_qry);
$rows=sql_fetch_array($b_count_result);
$board_update_qry=" update g5_board set "; $board_update_qry .=" bo_count_write='". $rows['cnt']."'"; $board_update_qry .=" where bo_table='". $row['bo_table'] ."'"; sql_query($board_update_qry); $j++; } ?>
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인