 |
Our
News
<%
Set conn = server.createobject("adodb.connection")
DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtemp=dsntemp & "DBQ=" & server.mappath("db/news.mdb")
set rs = Server.CreateObject("ADODB.recordset")
conn.Open DSNtemp
amount = request.querystring("Amount")
if amount <> "" then
SQLstmt = "SELECT Top " & amount & " Topic,DateofPost,Author,Email,Content FROM news where ALang =False ORDER BY DateofPost DESC"
else
SQLstmt = "SELECT Topic,DateofPost,Author,Email,Content FROM news where ALang =False ORDER BY DateofPost DESC"
end if
Set rs = conn.Execute(SQLstmt)
%>
<%
DO WHILE NOT rs.EOF
Topic = rs("Topic")
DateofPost = rs("DateofPost")
Author = rs("Author")
Email = rs("Email")
Content = rs("Content")
%>
|
<%=Topic%>
|
Posted On: <%=DateofPost%>
|
|
|
<%=Content%> |
|
|
<%
rs.MoveNext
LOOP
if amount <> "" then
%>
|