 |
|
แปลง PHP เป็น ASP for($i=0;$i<count($_POST["chkEmail"]);$i++) |
|
 |
|
|
 |
 |
|
Loop For ครับ
ASP/VBScript For ... Next
|
 |
 |
 |
 |
Date :
2013-08-16 16:07:32 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
คือผมไม่รู้จะหยุด Loop ที่ตรงไหนดี
for($i=0;$i<count($_POST["chkEmail"]);$i++)
ASP ใช้ Count ไม่ได้
ใช้ i++ ไม่ได้
เป็นไปได้ถ้ามี Multiple Checkbox Insert จะดีมากเลยครับนี่ ^^
|
 |
 |
 |
 |
Date :
2013-08-16 16:16:01 |
By :
Obaya |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ง่าย ๆ
Code (ASP)
For Each chkVol in Request.Form("chkDel")
strSQL = ""
strSQL = strSQL&"DELETE FROM customer "
strSQL = strSQL&"WHERE CustomerID = '"&chkVol&"' "
Set objExec = Conn.Execute(strSQL)
Next
|
 |
 |
 |
 |
Date :
2013-08-16 16:18:49 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ได้คำตอบแล้วครับ
Code (ASP)
<%
Option Explicit
Dim strSplit
strSplit = Split("1,2,3",",")
Response.write strSplit(0)&"<br>"
Response.write strSplit(1)&"<br>"
Response.write strSplit(2)&"<br>"
Response.write("<hr>")
Dim strSplit2,i
strSplit2 = Split("a,b,c,d,e",",")
For i = 0 To UBound(strSplit2)
Response.write strSplit2(i)&"<br>"
Next
'*** Split("a,b,c,d,e",",")(0)
'*** Split("a,b,c,d,e",",")(1)
'*** Split("a,b,c,d,e",",")(2)
'*** Split("a,b,c,d,e",",")(3)
'*** Split("a,b,c,d,e",",")(4)
%>
https://www.thaicreate.com/asp/asp-vbscript-split.html
ขอบคุณครับ
|
 |
 |
 |
 |
Date :
2013-08-16 16:30:44 |
By :
Obaya |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|

|
 |
 |
 |
 |
Date :
2013-08-16 16:57:52 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|