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

´Ð³×ÀÓ

vopos

À̸ÞÀÏ

vopos@happycgi.com

Á¦¸ñ

[´äº¯] [Áú¹®] DBI¸ðµâ¿¡¼­ prepare.....
³»¿ë
>$dbh=DBI->connect("DBI:mysql:ppp", "ppp","ppp");
>$sth=$dbh->prepare("SELECT * FROM a");
>$sth=$dbh->execute;
>$sth=$dbh->finish;
>$dbh->disconnect;
>
>¶ó´Â ÇÁ·Î±×·¥À» ÀÛ¼ºÇÏ°í.... ½ÇÇàÇϸé... ¾Æ¹«·± Ãâ·Â°á°úµµ
>Ç¥½Ã µÇÁö ¾Ê´Âµ¥¿ä....
>select * from a; ÇÑ ÀڷḦ È­¸é¿¡ Ãâ·ÂÇϱâ À§ÇÏ¿© ÀúÀåµÇ´Â °ø°£Àº..
>¾ø´ÂÁö¿ä? ¾î¶»°Ô ÇØ¾ß Ãâ·ÂµÇ´Â °ÅÁÒ?


¾È³çÇϼ¼¿ä, HappyCGI ÆÀÀÇ voposÀÔ´Ï´Ù.

´ÔÀÇ Äڵ忡´Â °á°ú°ªÀ» Ãâ·ÂÇÏ´Â ºÎºÐÀÌ ¾ø±â ¶§¹®ÀÔ´Ï´Ù.

SQL¹®ÀÇ °á°ú°¡ $sth·Î ÀúÀåÀÌ µÇ´Âµ¥ Perl DBI ÇÔ¼ö Áß¿¡ °á°ú°ªÀ» ÇϳªÇϳª¾¿
Ãâ·ÂÇÏ´Â ±â´ÉÀ» È°¿ëÇؾߵ˴ϴÙ.

¿¹)

my @row;
while(@row = $sth->fetchrow_array) {
    print "$row[0] $row[1]\n";
}


¿©±â¼­´Â fetchrow_array ÇÔ¼ö¿Í while ¹®À» ÀÌ¿ëÇؼ­ °á°ú°ªÀ» ¸ðµÎ Ãâ·ÂÇÏ´Â ¿¹
Á¦ÀÔ´Ï´Ù. ±× ¿Ü¿¡µµ ¿©·¯ ÇÔ¼ö°¡ ÀÖÀ¸´Ï±î Âü°íÇϼ¼¿ä.

http://www.savebaseball.com/mysql/DBD_3.22.X.php3


°¨»çÇÕ´Ï´Ù.

- vopos

/----------------------------------------------------------------------------------------------------
ÀÚÁÖ¹¯´Â Áú¹® Æ÷·³°ú Æ÷·³°Ë»öÀ» ÀÌ¿ëÇϼż­ ºñ½ÁÇÑ Áú¹®ÀÇ ´äº¯ÀÌ ÀÖ´ÂÁö
È®ÀÎÇÏ½Ã°í ±Û ¿Ã·ÁÁÖ½Ã±æ ºÎŹµå¸³´Ï´Ù.
----------------------------------------------------------------------------------------------------/
Ãßõ½ºÅ©·¦¼Ò½ºº¸±â ¸ñ·Ï
ÀÌÀü°Ô½Ã±Û [Áú¹®] DBI¸ðµâ¿¡¼­ prepare..... 2001-06-07 19:27:31
´ÙÀ½°Ô½Ã±Û ¹«½ÄÇÑÁú¹®Çϳª ÇÏ°Ú½À´Ï´Ù. 2001-06-08 11:29:20