PHP Code:
dim aMyRecordSet, boolSuccess
aMyRecordSet = aGetRecords ("SELECT * from TABLE;")
boolSuccess = Dump2dArray(aMyRecordSet)
function Dump2dArray(aMyRecordSet)
dim intTotalRowCount, intTotalColCount, intColCounter, intRowcounter
intTotalRowCount = ubound(aMyRecordSet,2)
intTotalColCount = ubound(aMyRecordSet,1)
response.write "<ol>"
FOR intRowcounter = 0 TO intTotalRowCount
response.write "<li><ul>"
FOR intColCounter = 0 TO intTotalColCount
response.write "<li>"&aMyRecordSet(intColCounter, intRowcounter)&"</li>"
NEXT
response.write "</ul></li>"
NEXT
response.write "</ol>"
end function
function aGetRecords (strSQL)
dim conn, rs
Set conn = Server.CreateObject("ADODB.Connection")
conn.open YOURDSNHERE
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open strSQL, conn
if not rs.BOF and not rs.EOF then
aGetRecords = rs.GetRows
else
aGetRecords=""
end if
rs.close
conn.close
Set rs = Nothing
Set conn = Nothing
end function
Bookmarks