|
|
|
|
俵ÀÌ / 2001-01-15 / ¿ÀÈÄ 9:26:15 / 203.255.3.190
Á¶È¸¼ö : 142
|
[Áú¹®] ¹Î¸ÁÇÑ For Next..^^; |
> 俵´Ô..¼Ò½º ±¸Á¶°¡ ¾îÄÉ µÇ³Ä¸é¿ä
> ¸ÕÀú üũ¹Ú½º¸¦ ÅëÇؼ °ªÀ» ¹Þ¾Æ µå¸³´Ï´Ù.
> ±×·±´ÙÀ½¿¡ ·çÇÁ¸¦ µ¹¸é¼
> row°ªµéÀ» »Ì¾Æ ³½ ´ÙÀ½¿¡
>
> ÇØ´ç row¿¡ image1 image2°ª¿¡ ¾÷·ÎµåµÈ À̹ÌÁöµéÀ»
> »èÁ¦ ½Ãų·Á±¸ Çϰŵç¿ä..
>
> ±×·±µ¥..Àß ¾ÈµË´Ï´Ù.
> Çϳª¾¿ Áö¿ï¶§´Â Àß µÇ´Âµ¥
> µÎ°³ ÀÌ»ó Áö¿ï·Á°íÇѱî..
> ¿¡·¯°¡..
> ·¹Äڵ尡 óÀ½°ú ³¡À̶ó..¾î¼±¸...Àú¼±¸....ÀÌ·± ¸Þ¼¼Áö ÀÖÀݾƿë^^;
>
> ¾îµð¼ À߸ø..µÈ°É±î¿ä?
>
> ------------------------------------------------
> goods_id = Request("goods_id")
>
> if goods_id = "" then
> else
> goods_id_arr = Split(goods_id, ",")
> arr_cnt = UBound(goods_id_arr)
> dim del_image(1)
>
> Set Fso = Server.CreateObject("Scripting.FileSystemObject")
>
> For i = 0 to arr_cnt
> sql2 = "select goods_id, image1 as image0, image2 as image1 from goods_tb where goods_id = '"& goods_id_arr(i) &"'"
> response.write sql2
> set rs = db.execute(sql2)
>
> For j = 0 to 1
> del_image(j) = rs("image"&j)
> delfile=Server.MapPath("images")&"\"&del_image(j)
> response.write delfile
> if (Fso.FileExists(delfile)) Then
> Fso.DeleteFile(delfile)
> end if
> Next
>
> sql = "Delete From goods_tb Where goods_id = '"& goods_id_arr(i) &"'"
> db.execute(sql)
> Next
>
> Set Fso = nothing
>
> rs.close
> db.close
> set rs = nothing
> set db = nothing
>
> 'response.redirect "goods_list.asp"
>
> end if
>
-----------------------------------------------------------
Á¦ °æÇè¿¡ ÀÇÇϸé ÀÌ°Ç ·çÇÁ»óÀÇ ¹®Á¦°¡ ¾Æ´Ñ°Í °°±¸¿ä...
goods_id_arr = Split(goods_id, ",")
ÀÌ·¸°Ô ÇϽà ¸¶½Ã±¸¿ä
goods_id_arr = Split(goods_id, ", ")
ÀÌ·¸°Ô ÇØ º¸¼¼¿ä.....
¿Ö³Ä¸é üũ¹Ú½º·Î °ªÀÌ ³Ñ¾î¿Ã¶§...
1,2,3,4,... ÀÌ·¸°Ô ³Ñ¾î¿À´Â°ÍÀÌ ¾Æ´Ï°í
1, 2, 3, 4 ÀÌ·¸°Ô ³Ñ¾î¿À°Å´ø¿ä.....
Áï ,¸»°í °ø¹éÀÌ ÇÏ´Â ´õ ÇÊ¿äÇÏÁÒ... ¾Æ´Ï¸é trimÀ¸·Î °ø¹éÀ» ¾ø¾Ö Áֽôø°¡¿ä....
±×¸®°í
if goods_id = "" then
else
goods_id_arr = Split(goods_id, ",")
~~~~~~~~~~~~~~~~~~
À̰ͺ¸´Ù´Â
if not goods_id = "" then
goods_id_arr = Split(goods_id, ",")
~~~~~~~~~~~~~~~~~~
ÀÌ·¸°Ô ÇϽô°ÍÀÌ ifÀÇ »ç¿ë¿¡ ´õ ¼¼·ÃµÇ¾î º¸ÀÏ°Í °°³×¿ä... ^^
´« ¾ÆÁ÷ ´Ù ¾È ³ì¾ÒÀ»ÅÙµ¥... Á¶½ÉÇϼ¼¿ä~~
|
|
|
|