½ÃÀÛÆäÀÌÁö·Î Áñ°Üã±âÃß°¡
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ l Ã⼮üũ l ¸¶ÀÌÆäÀÌÁö l CGIMALL
ÀÚ·á½Ç »çÀÌÆ®µî·Ï ·©Å·100 ÇÁ·Î±×·¥¸®ºä °ü¸®ÀÚÃßõÀÚ·á Ãʺ¸°¡À̵å
Ä¿¹Â´ÏƼ
Àüü ÆîÃ帱â
Äü¸Þ´º¸µÅ© jquery , CSS , PHP , Javascript , ¹«·áÆùÆ® , ASP
»ó¼¼°Ë»ö
Ȩ > Ä¿¹Â´ÏƼ > Áú¹®°ú´äº¯ »ó¼¼º¸±â
Ä¿¹Â´ÏƼ ±¸Àα¸Á÷
»çÀÌÆ®µî·Ï
Ŭ¶ó¿ìµåű×
Javascript
PHP
asp
CSS
HTML
mysql
jquery
image
Mobile
API
slide
°Ô½ÃÆÇ
¸Þ´º
ÇöÀçÁ¢¼ÓÀÚ ¸í »õ·Î°íħ
°Ô½ÃÆÇŸÀÌƲ Áú¹®°ú´äº¯ / »ó¼¼º¸±â
Æ®À§ÅÍ·Î º¸³»±â
Ãßõ¼ö 38 | Á¶È¸¼ö 507 | µî·ÏÀÏ 2001-04-25 14:18:34

´Ð³×ÀÓ

HappyCGI

À̸ÞÀÏ

hero@happycgi.com

Á¦¸ñ

[´äº¯] insert½Ã...
³»¿ë
>ÀÔ·ÂÀ» ¹Þ´Â È­¸é¿¡¼­ µ¥ÀÌŸ¸¦ °¡Á®¿ÂÈÄ,
>±× µ¥ÀÌŸ¸¦ 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
À§ ÁÖ¼Ò¸¦ Âü°íÇغ¸¼¼¿ä.

ÁÁÀº ÇÏ·çµÇ¼¼¿ä.


Ãßõ½ºÅ©·¦¼Ò½ºº¸±â ¸ñ·Ï
ÀÌÀü°Ô½Ã±Û cgi¸¦ ±¸Çؼ­ ¿Ã·È´Âµ¥ ±×¸²¸¸ ±úÁö³×¿ä¤Ì¤Ì 2001-04-25 13:46:26
´ÙÀ½°Ô½Ã±Û blat¸¦ ÀÌ¿ëÇϱâ À§ÇÑ Gensok.dll 2001-04-26 08:06:27