% Set Connection = Server.CreateObject("ADODB.Connection") Connection.Open "frui11.fruit" sql = "SELECT MAX(ID) FROM backgroundimages where fruit='apples'" SET results = Connection.Execute(sql) ' upperlimit = results(0) lowerlimit = 1 ' randomize imagenumber = Int((upperlimit - lowerlimit + 1)*Rnd() + lowerlimit) selectimage ' backgroundimage = results(0)&".jpg" 'response.write(backgroundimage) 'response.end sub selectimage sql = "SELECT filename FROM backgroundimages WHERE ID = "&imagenumber SET results = Connection.Execute(sql) if results.eof then selectimage end sub %> <% username = "csp" %>
|
||||||||||||||||
|
||||||||||||||||