|
|
|
|
俵ÀÌ / 2000-06-16 / ¿ÀÈÄ 6:44:50 / 203.255.3.190
Á¶È¸¼ö : 210
|
[Áú¹®] üũ¹Ú½º·Î ¹ÞÀº °ª(¹®ÀÚ¿)À» db¿¡ intÇüÀ¸·Î ´Ù½Ã ³Ö¾îÁÖ±â |
>
> ¾ÕÆäÀÌÁö
>
> < input type="checkbox" name="team_num" value="1 >
> < input type="checkbox" name="team_num" value="2 >
> < input type="checkbox" name="team_num" value="3 >
> ------------------------------------------------------
> ¹Ø¿¡ team_numÀº ¾Õ ÆäÀÌÁö¿¡¼ üũ¹Ú½º·Î ¹ÞÀº °ªÀÔ´Ï´Ù.(¸ÖƼ°ª)
> ¿¹¸¦ µé¾î team_num°ªÀº (2,12,4) ¹®ÀÚ¿·Î °ªÀ» ¹Þ¾Æ¿À´Âµ¥
> split()¸¦ ÀÌ¿ëÇÏ¿© ÀÌ °ªµéÀ» °¢°¢ db¿¡ ÀúÀåÇØÁÖ´Â ºÎºÐ¿¡¼ ¿¡·¯°¡ ³ª
> ³×¿ä.Å×À̺íÀÇ Å×ÀÌÅÍ Å¸ÀÔÀº team_num1,,,team_3 ¸ðµÎ intÇüÀε¥, üũ¹Ú
> ½º·Î ¹ÞÀº °ªÀº vacharÇüÀ̶ó¼ ÀÔ·ÂÀÌ ¾ÈµË´Ï´Ù.
> intÇüÀ¸·Î ¹Ù²Ù¾î¼ ³ÖÀ» ¼ö ¾ø³ª¿ä?
>
> ---------ÇöÀç ÆäÀÌÁö---------
> <%
>
> team_num =Request.Form("team_num")
>
> test=split(team_num)
>
>
> Set db=Server.CreateObject("ADODB.Connection")
> db.Open("Dsn=xx;uid=xx;pwd=xx")
>
>
> SQL = "INSERT INTO playoffbet
> (mem_id,bet_point,team_num1,team_num2,team_num3,league_num,item_nu
> m) values ('"&session("mem_id")&"','"&bet_point&"','"&test(0)&"','"&test
> (1)&"','"&test(2)&"','"&league_num&"','"&item_num&"')"
>
> db.Execute sql
> %>
>
-----------------------------------------------------------
test_num1ÀÇ °ªÀÌ INTÇüÀ̶ó¸é¼ ¿Ö INSERTÇϽǶ§ ÀÛÀº µû¿ÈÇ¥·Î ¹¾îÁֽóª¿ä?
INTÇüÀº ÀÛÀº µû¿ÈÇ¥·Î ¹¾îÁÖ½Ç ÇÊ¿ä°¡ ¾ø½À´Ï´Ù...
±×¸®°í Split ÇÔ¼öµµ ¾à°£ ÀÌ»óÇÑ°Í °°³×¿ä..
test=split(team_num, ", ")
ÀÌ·¸°Ô ÇÏ¼Å¾ß µÇ´Â°Å ¾Æ´Ñ°¡¿ä?
±×·³....
|
|
|
|