<%@ Language=VBScript%> <% Option explicit Response.Expires = -1000 Response.Buffer = True Posts_on_Page = 100 '<-- Just change this number to change the amount of shown posts on the page Dim conn Dim DSNtemp Dim sql Dim x Dim news Dim poster Dim PostDate Dim title Dim rs Dim Posts_on_Page %> The Plant Peddler
Current Specials:
<% Set conn = Server.CreateObject("ADODB.connection") DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; " DSNtemp=DSNtemp & "DBQ=" & server.mappath("admin/news.mdb") conn.Open DSNtemp sql = "SELECT * from news ORDER BY date DESC" Set rs = Server.CreateObject("ADODB.Recordset") rs.Open sql, conn, 3, 3 x = 0 For x = 1 to Posts_on_Page If rs.EOF then Exit For Else news = rs("news") poster = rs("poster") PostDate = rs("date") title = rs("title") %>
  • <%=news%>
  • <% rs.MoveNext End If Next rs.Close Set rs = nothing conn.Close Set conn = nothing %>

    Site Design by: Soani.Net