% 'Create a connection to our database using a fileless dsn Response.Buffer = true dim cnn,MyRS set cnn = Server.CreateObject("ADODB.Connection") set MyRS = Server.CreateObject("ADODB.RecordSet") cnn.Open "DSN=rotary;" sqltext = "select *, DATE_FORMAT(EventDate, ""%W %D %M %Y"") as date_format from events " & _ " WHERE ClubID = '" & strClub & "' AND EventDate > DATE_ADD(CURRENT_DATE, INTERVAL -1 DAY) " & _ " ORDER By EventDate " MyRS.Open sqltext,cnn,3,3 %>
| " & MyRS("Heading") & " | " & "" & MyRS("date_format") & " (" & MyRS("Venue") & ") " & _ MyRS("Details") & " | "
End If
%>
| <% If MyRS("EventCost") <> "" Then Response.Write "Cost : " & MyRS("EventCost") & "" End If %> <% If MyRS("EventTime") <> "" Then Response.Write "Time : " & MyRS("EventTime") & "" End If %> | |
| <% If Len (MyRS("Link")) > 3 Then Response.Write "More Info : " & MyRS("Link") & "" End If %> |
<% MyRS.MoveNext Wend ' Done. Now close the Recordset MyRS.Close Set rs = Nothing %>