>ÀÔ·ÂÀ» ¹Þ´Â ȸ鿡¼ µ¥ÀÌŸ¸¦ °¡Á®¿ÂÈÄ,
>±× µ¥ÀÌŸ¸¦ DB¿¡ ÀúÀåÈÄ Ãâ·Â¾ç½ÄÀ» º¸¿©ÁÖ·Á ÇÕ´Ï´Ù.
>À§¿¡¼ ¸»ÇÑ DB¿¡ ÀúÀåÇÏ°í Ãâ·Â¾ç½ÄÀ» »Ñ·ÁÁÖ´Â ÀÌ ³»¿ëÀ»...
>À¥ÆäÀÌÁö ÇÑ °÷¿¡¼ ÇÒ ¼ö ÀÖ°ÚÁÒ?
>
>±×·¡¼...³ª¸§´ë·Î Çغôµ¥...
>DB¿¡ insertÈÄ, ±× insert³»¿ëÀ» ȸ鿡 º¸¿©Áà¾ß Çϴµ¥...
>Àß ¾È³ªÅ¸³ª³×¿ä..
>
>cgiÂÊ¿¡¼ print¹®À» ½á¼ º¸ÀÌ¸é º¸À̴µ¥...
>commit(); ÈÄ¿¡ ³»¿ëÀ» ¾²¸é ÇϳªµÎ ¾È³ªÅ¸³ª´Âµ¥...
>¹«¾ùÀ» À߸øÇÏ°í Àִ°ÇÁö... ¾Ë·ÁÁÖ¼ÌÀ¸¸é ÇÕ´Ï´Ù..
>
>
>if(($seq_num1 ne '') && ($hyufrom[$i] ne '') && ($hyuto[$i] ne '')) {
> $j++;
> $query = "INSERT INTO pb_t_24(seqnum, hyufrom, hyuto, sabun, reqil, sayong, hyucode, sayu, signyn, updateil, bigo1, bigo2)
> VALUES('$seq_num1', '$hyufrom[$i]', '$hyuto[$i]', '$sabun','$now_date2', '$sayong[i]', '$hyucode[$i]', 'sayu', 'N','', '', '')";
>
> print "
seq_num1 : $seq_num1";
> print " hyufrom[$i] : $hyufrom[$i]
";
> print " hyuto[$i] : $hyuto[$i]
";
> print " query1 : $query
";
>
> my $sth = $dbh->prepare($query);
> $sth->execute or die "Unable to execute query : $dbh->errstr\n";
>
> } #if_end
>print " query2 : $query
";
> } #for_end
>
>$dbh->commit();
>
>#####################
>
>print <<_PRNOFHTML1_;
>
>
¾ç½ÄÀÔ´Ï´Ù..
>
>print¹®Àº Àß Ãâ·ÂÀÌ µÇ´Âµ¥... '¾ç½ÄÀÔ´Ï´Ù'¶ó´Â ¹®±¸´Â ¾È³ª¿À³×¿©..
>¹®¹ýÀÌ Æ²¸°°ÇÁö¿ä..?
>
>
>
¾È³çÇϼ¼¿ä. ÇØÇÇCGI À¥¸¶½ºÅÍ À±¿µ¿õÀÔ´Ï´Ù.
$dbh->commit();
À» $dbh->disconnect;
·Î ¹Ù²Ù¼¼¿ä.
¾Æ¸¶µµ DB¿ÍÀÇ Á¢¼ÓÀ» ²÷À»·Á°í ¾²½Å°Í °°Àºµ¥¿ä.
commit´Â ¾Æ·¡ ó·³ ¼³¸íÀÌ µÇ¾îÀֳ׿ä.
¸¸¾à µ¥ÀÌŸº£À̽º°¡ Æ®·£Àè¼ÇÀ» Áö¿øÇÏ°í autocommit °¡ offµÈ »óŶó¸é
DB¸¦ ¹Ù²Ù´Âµ¥ ÀÖ¾î¼ °¡Àå ÃÖ±ÙÀÇ ¹æ¹ýÀÌ´Ù.
(perl DBI Ãâó : O'reilly)
commit´Â Á¦°¡ Àß¾²Áö ¾ÊÀº°Å¶ó Á¤È®ÇÏ°Ô ÀÌÇظ¦ Àß ¸øÇϰڳ׿ä. ^^
http://www.mysql.com/doc/C/O/COMMIT.html
À§ ÁÖ¼Ò¸¦ Âü°íÇغ¸¼¼¿ä.
ÁÁÀº ÇÏ·çµÇ¼¼¿ä.