<%@ Language="VBScript" %> <% Option Explicit %> Photography page: WBW Photography <% Dim strLogin Dim intPics_count Dim strConnection Dim adoDataConn Dim strQuery Dim RS strLogin = Session("login") intPics_count = 0 strConnection = "driver={MySQL};server=localhost;uid=waveenter;pwd=qX3swaHD;database=waveenter;option=NUM" Set adoDataConn = Server.CreateObject("ADODB.Connection") adoDataConn.Open strConnection strQuery = "SELECT count FROM tb_pictures WHERE pictype = 'photography';" Set RS = adoDataConn.Execute(strQuery) Do While Not RS.EOF intPics_count = RS.Fields("count") RS.MoveNext Loop Dim strPicFolder %>
<% If (intPics_count >= 5) Then %> <% Else %> <% End If %>
  Pictures: 1 - 5 of <%=intPics_count%>  
  Pictures: 1 of <%=intPics_count%>  
 
<% If(intPics_count>=5) Then %> <% Elseif(intPics_count>=4) Then %> <% Elseif(intPics_count>=3) Then %> <% Elseif(intPics_count>=2) Then %> <% Else %> <% End If %>
 
   
     
       
<% If(intPics_count>5) Then %> <% Else %> <% End If %>
 
<% RS.Close Set RS = Nothing adoDataConn.Close Set adoDataConn = Nothing Session("SessiontotalRecords") = intPics_count Session("SessionlastRecord") = 5 %>