Game Results Team Stats Individual Stats Home Roster & Schedule Pictures Driving Directions
<% ' this code opens the database myDSN="DSN=renegades" set conntemp=server.createobject("adodb.connection") conntemp.open myDSN pic_var=request.querystring("picvar") if pic_var = "" then pic_var = 1 end if mySQL="select imagenumber,caption from pictures where imagenumber=" & pic_var & "" set rstemp=conntemp.execute(mySQL) ' this code detects if data is empty If rstemp.eof then response.write "No records matched
" response.write mySQL & "
So cannot make table..." rstemp.close set rstemp=nothing response.end end if mySQL2="select count(imagenumber) as imgcount from pictures" set rstemp2=conntemp.execute(mySQL2) ' this code detects if data is empty If rstemp2.eof then response.write "No records matched
" response.write mySQL2 & "
So cannot make table..." rstemp2.close set rstemp2=nothing response.end end if pic_caption=rstemp("caption") img_count=rstemp2("imgcount") response.write "" if pic_var > 1 then response.write "" else response.write "" end if response.write "" if cInt(pic_var) < img_count then response.write "" else response.write "" end if response.write "" response.write "" response.write "" response.write "" response.write "
" for x = 1 to img_count if x = cInt(pic_var) then response.write "" & x & " " else response.write "" & x & " " end if next response.write "
Previous Pic
 

Some pictures

Next Pic

" & pic_caption & "

" ' Now close and dispose of resources rstemp.close set rstemp=nothing conntemp.close set conntemp=nothing %>