<?php
mysql_connect("호스트명", "아이디", "비번");
mysql_query("set names utf8");
mysql_select_db("DB명");
$board = array(51,59);
$title = array("aaa","bbb","ccc");
for( $i=0 ; $i<count($board) ; $i++ )
{
for( $j=0 ; $j<count($title) ; $j++ )
{
mysql_query("insert into xe_sequence (seq) values ('0')");
$insert_id = mysql_insert_id();
$regdate = date("YmdHis");
$sql = "insert into xe_document_categories(category_srl, module_srl, parent_srl, title, expand, document_count, regdate, last_update, list_order, group_srls, color) values";
$sql .= "('$insert_id', '$board[$i]', 0, '$title[$j]', 'N', 0, '$regdate', '$regdate', '$insert_id', '', 'transparent')";
mysql_query($sql);
}
}
?>
mysql_connect("호스트명", "아이디", "비번");
mysql_query("set names utf8");
mysql_select_db("DB명");
$board = array(51,59);
$title = array("aaa","bbb","ccc");
for( $i=0 ; $i<count($board) ; $i++ )
{
for( $j=0 ; $j<count($title) ; $j++ )
{
mysql_query("insert into xe_sequence (seq) values ('0')");
$insert_id = mysql_insert_id();
$regdate = date("YmdHis");
$sql = "insert into xe_document_categories(category_srl, module_srl, parent_srl, title, expand, document_count, regdate, last_update, list_order, group_srls, color) values";
$sql .= "('$insert_id', '$board[$i]', 0, '$title[$j]', 'N', 0, '$regdate', '$regdate', '$insert_id', '', 'transparent')";
mysql_query($sql);
}
}
?>