ASP
ASP, DB에서 조회된 값 isarray로 값 받아서 for문 돌리기
yes or yes
2022. 5. 2. 17:17
반응형
list2 = NULL
strSql =""
strSql = strSql&" SELECT 컬럼1, 컬럼2, 컬럼3, 컬럼4 "
strSql = strSql&" FROM 테이블 where 조건 "
Set objRs = DBExec(strSql, "abcdef")
If Not (objRs.EoF And objRs.BoF) Then
list2 = objRs.getrows
End If
Call DBClose(objRs)
If IsArray(list2) = True Then
For n = 0 To UBound(list2,2)
컬럼a = list2(0,n) '컬럼1
컬럼b = list2(1,n) '컬럼2
컬럼c = list2(2,n) '컬럼3
컬럼d = list2(3,n) '컬럼4
<%=컬럼a %><%=컬럼b %><%=컬럼c %><%=컬럼d%>
next
end if
반응형