% on error resume next session("ListURL") = request.ServerVariables("URL") ' ------------------------------------------------------------------- ' Get last update date from the catalogue ' ------------------------------------------------------------------- set rs = db.Execute ("SELECT Max(Modified) AS LastUpdate FROM tbl_Item") LastUpdate = rs("LastUpdate") ' ------------------------------------------------------------------- ' Now get three random item IDs from the catalogue ' ------------------------------------------------------------------- ' First get an array of the 30 most recent items sql = "SELECT TOP 30 i.Item_ID,Title,URL FROM tbl_Item i INNER JOIN tbl_Image g ON i.Item_ID = g.Item_ID WHERE g.Sequence = 1 and i.Active = True ORDER BY Listed DESC" set rs = db.Execute(sql) itemarr = rs.GetRows() ' Then create another random array of indexes to use from the first array randomize dim iitems (3) i = 0 do while i <= 2 ip = Int(Rnd * 30) used = false for j = 0 to i - 1 if iitems(j) = ip then used = true next if not used then iitems(i) = ip i = i + 1 end if loop %>
Decorative Antiques > Home |
||||||||||||||||||||||
The Decorative Antiques home page has changed Please use the Home button on the left, and update your bookmarks! |
||||||||||||||||||||||
Web design |
||||||||||||||||||||||