%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% Dim t5 Dim t5_cmd Dim t5_numRows '*************************************** create the record set, then select the data Set t5_cmd = Server.CreateObject ("ADODB.Command") t5_cmd.ActiveConnection = MM_top5_STRING t5_cmd.CommandText = "SELECT * FROM topfive ORDER BY id DESC" t5_cmd.Prepared = true Set t5 = t5_cmd.Execute t5_numRows = 0 %> <% '*************************************** sets up the repeat region Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = -1 Repeat1__index = 0 t5_numRows = t5_numRows + Repeat1__numRows '*************************************** create a variable for data that isn't in every record Dim TextShow TextShow = t5.Fields.Item("guilty_pleasure").Value %>
<% '*************************************** the beginning of the "repeat region" While ((Repeat1__numRows <> 0) AND (NOT t5.EOF)) %>