|
|
|
|
¹Ý¾ß / 2000-06-16 / ¿ÀÈÄ 6:37:29 / 210.207.238.52
Á¶È¸¼ö : 127
|
[Áú¹®] üũ¹Ú½º·Î ¹ÞÀº °ª(¹®ÀÚ¿)À» 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
%>
|
|
|
|