%
dim rs
dim sql
Sub performQuery()
sql = "SELECT News.Body, News.Special, News.Title, News.Date, News.NewsID "
sql = sql & "FROM News"
if request.queryString("View") <> "" then
sql = sql & " WHERE News.Special='" & request.queryString("View") & "'"
end if
sql = sql & " ORDER BY News.Date DESC"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 0, 1
End Sub
%>
<%
dim rs2
dim sql2
Sub performQuery2()
sql2 = "SELECT Articles.Body, Articles.Special, Articles.Title, Articles.Date, Articles.NewsID "
sql2 = sql2 & "FROM Articles"
if request.queryString("View") <> "" then
sql2 = sql2 & " WHERE Articles.Special='" & request.queryString("View") & "'"
end if
sql2 = sql2 & " ORDER BY Articles.Date DESC"
Set rs2 = Server.CreateObject("ADODB.Recordset")
rs2.Open sql2, conn, 0, 1
End Sub
%>
Assemblymen Herb Conaway and Jack Conners: Serving the 7th Legislative District
Upcoming Events
<%
Sub performQuery()
sql = "SELECT Calendar.CalendarID, Calendar.Date,"
sql = sql & "Calendar.Title FROM Calendar WHERE Date>=#"&FormatDateTime(Now, 2)&"#"
sql = sql & " ORDER BY Calendar.Date"
Set rs2 = Server.CreateObject("ADODB.Recordset")
rs2.Open sql, conn, 0, 1
End Sub
Sub printMonth()
if not rs2.eof then
%>
<%
end if
End Sub
Function checkMonth(currentMonth)
if rs2.eof = true then
checkMonth = false
else
if Month(rs2.Fields("Date")) <> currentMonth then
checkMonth = false
else
checkMonth = true
end if
end if
End Function
performQuery()
%>
<%
printMonth()
%>
<%
if not rs2.eof then
curMon = Month(rs2.Fields("Date"))
end if
do while Not rs2.eof AND checkMonth(curMon)%>