<%
Dim y,YearArray(4) 'Fixed size array
YearArray(0) = "2552"
YearArray(1) = "2553"
YearArray(2) = "2554"
YearArray(3) = "2555"
For y = 0 To UBound(YearArray)
'Response.write YearArray(y)&"<br>"
IF select_academic_year = "YearArray" THEN
Sql ="SELECT * FROM student"
END IF
Next
%>
<%
Dim y,YearArray(4) 'Fixed size array
YearArray(0) = "2552"
YearArray(1) = "2553"
YearArray(2) = "2554"
YearArray(3) = "2555"
Dim whereCol
For y = 0 To UBound(YearArray) - 1
IF y = 0 Then
whereCol = " '"&YearArray(y)&"' "
Else
whereCol = where & " , '"&YearArray(y)&"' "
End IF
Next
Sql ="SELECT * FROM student WHERE select_academic_year IN ("&whereCol&") "
%>