Function GetNewChance() sql = "SELECT * FROM sidste_chance WHERE aktiv = 1 ORDER BY RAND() LIMIT 1" Response.Write sql Set Rs = Conn.Execute(sql) set tempRs = Conn.Execute("SELECT * FROM sh_dk WHERE id = " & rs("husid") & "") if tempRs("visninger") > int(0) then Conn.Execute("UPDATE sh_dk SET visninger = visninger-1 WHERE id = " & rs("id") & "")
Response.Write "<b>Sidste Chance i uge: " & rs("uger") & "<br>" Response.Write "<img style=""cursor: hand;"" onclick=""location.href='sh_dk.asp?id=" & rs("husid") & "&chance=" & rs("id") & "'"" src=""images/houses/" & rs("husid") & "/big_1.jpg"" width=""200"" height=""125""><br>" Response.Write "Lej huset til: " & rs("pris") & "kr,-<br><br>" else GetNewChance() end if Set tempRs = Nothing Set rs = Nothing End function
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.