// 해당 년/월의 데이타를 가져옴
$result = mysql_query("select * from log where insert_time like '$year-$month-%' and menu_no != '0' and list_no != '0' and cont_no != '0'", $connect);
// 해당 년/월의 데이타 개수
$total_data = mysql_num_rows($result);
echo "$year년 $month월의 전체 데이타 : $total_data 건 <br><br>";
$start = 1;
// 페이지에 데이터 출력 루프문
while ($data=mysql_fetch_array($result)) {
// 해당 년/월의 데이타 개수
$menuvar = mysql_fetch_array(mysql_query("select * from cont where no = '$data[cont_no]'", $connect));
// 데이타 수정
mysql_query("update log set group_no='$menuvar[grup_no]', artist_no='$menuvar[artist_no]' where no = '$data[no]'") or mysql_error();