<% function safelen(byval title) if Len(title) > 11 then safelen = left(title,9) & ".." else safelen = title end if end function set tigCON = Server.CreateObject("ADODB.Connection") tigCON.Open(DSN) ' set up the query to list the news by date Desc query = "SELECT id, str_title " query = query & "FROM q3a_levels " query = query & "ORDER BY datestamp DESC" 'Response.Write("Query = [" & query & "]
") set tigRS = tigCON.Execute(query) ' make sure we have see if there is no records if (tigRS.EOF) Then %> <% end if i = 1 do while not (tigRS.EOF) and (i < 21) %> <% i = i + 1 tigRS.MoveNext loop tigRS.close tigCON.close %>