<% Set myConn = Server.CreateObject("ADODB.Connection") strDSN = "DRIVER={MySQL}; Server=mydb6.surf-town.net; Database=spoforum; Uid=spoaddict; Password=spassersoren;" myConn.Open strDSN count = 0 strSQL = "SELECT * FROM blogs ORDER BY ID DESC" Set rs = myConn.Execute(strSQL) If Not (rs.BOF Or rs.EOF) Then Do While Not rs.EOF strSQL = "SELECT *, DATE_FORMAT(date,'%d-%m-%Y') AS FormDate, TIME_FORMAT(date,'%H:%i') AS FormTime FROM blogs WHERE (id =" & rs("id") & ")" Set formatDate = myConn.Execute(strSQL) dtmFormatDate = formatDate("FormDate") var = rs("bruger") strSQL2 = "SELECT username FROM spobruger WHERE brugerID =" & var set rs2 = myConn.Execute(strSQL2) strname = rs2("username") strSQL = "SELECT Count(*) AS ItemCount FROM blogs Where (id = " & rs("id") & ")" if var <> Request("brugerID") then else Set recordCount = myConn.Execute(strSQL) strHTML = strHTML & " (" & dtmFormatDate & ")
"& strname & " - " & rs("emne") & "
" & rs("comment") & "
" end if rs.MoveNext Loop End If myConn.Close Set myConn = Nothing %> bruger blog
skriv

<%=strHTML%>