Set counter = Conn.Execute(\"SELECT Count(*) AS Count FROM statement\") Set rs = Conn.Execute(\"SELECT * FROM statement\")
if rs.eof Then If counter(\"Count\") > 0 Then Randomize() Move = Int(counter(\"Count\") * Rnd) + 1 for i = 1 to Move rs.Move Move next End If Response.Write rs(\"tekst\") & \"<br>\" else response.write \"Der blev ik fundet noget\" & \"<br>\" end if
Set rs = Nothing set counter = nothing Conn.Close Set Conn = Nothing %>
<% if Request.Querystring(\"do\") = \"random\" then Set Conn = Server.CreateObject(\"ADODB.Connection\") Conn.Open \"DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=\" & Server.MapPath(\"data.mdb\")
Set counter = Conn.Execute(\"SELECT Count(*) AS Count FROM statement\") Set rs = Conn.Execute(\"SELECT * FROM statement\")
if rs.eof Then If counter(\"Count\") > 0 Then Randomize() Move = Int(counter(\"Count\") * Rnd) + 1 for i = 1 to Move rs.Move Move next End If Response.Write rs(\"tekst\") & \"<br>\" else response.write \"Der blev ik fundet noget\" & \"<br>\" end if
Set rs = Nothing set counter = nothing Conn.Close Set Conn = Nothing end if %>
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.