%@LANGUAGE="VBSCRIPT"%> <% Dim rsRedDwarfMerchandise Dim rsRedDwarfMerchandise_numRows Set rsRedDwarfMerchandise = Server.CreateObject("ADODB.Recordset") rsRedDwarfMerchandise.ActiveConnection = MM_cnMerchandise_STRING rsRedDwarfMerchandise.Source = "SELECT * FROM reddwarf_merchandise ORDER BY ID DESC" rsRedDwarfMerchandise.CursorType = 0 rsRedDwarfMerchandise.CursorLocation = 2 rsRedDwarfMerchandise.LockType = 1 rsRedDwarfMerchandise.Open() rsRedDwarfMerchandise_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = -1 Repeat1__index = 0 rsRedDwarfMerchandise_numRows = rsRedDwarfMerchandise_numRows + Repeat1__numRows %> <% ' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables Dim rsRedDwarfMerchandise_total Dim rsRedDwarfMerchandise_first Dim rsRedDwarfMerchandise_last ' set the record count rsRedDwarfMerchandise_total = rsRedDwarfMerchandise.RecordCount ' set the number of rows displayed on this page If (rsRedDwarfMerchandise_numRows < 0) Then rsRedDwarfMerchandise_numRows = rsRedDwarfMerchandise_total Elseif (rsRedDwarfMerchandise_numRows = 0) Then rsRedDwarfMerchandise_numRows = 1 End If ' set the first and last displayed record rsRedDwarfMerchandise_first = 1 rsRedDwarfMerchandise_last = rsRedDwarfMerchandise_first + rsRedDwarfMerchandise_numRows - 1 ' if we have the correct record count, check the other stats If (rsRedDwarfMerchandise_total <> -1) Then If (rsRedDwarfMerchandise_first > rsRedDwarfMerchandise_total) Then rsRedDwarfMerchandise_first = rsRedDwarfMerchandise_total End If If (rsRedDwarfMerchandise_last > rsRedDwarfMerchandise_total) Then rsRedDwarfMerchandise_last = rsRedDwarfMerchandise_total End If If (rsRedDwarfMerchandise_numRows > rsRedDwarfMerchandise_total) Then rsRedDwarfMerchandise_numRows = rsRedDwarfMerchandise_total End If End If %> <% ' *** Recordset Stats: if we don't know the record count, manually count them If (rsRedDwarfMerchandise_total = -1) Then ' count the total records by iterating through the recordset rsRedDwarfMerchandise_total=0 While (Not rsRedDwarfMerchandise.EOF) rsRedDwarfMerchandise_total = rsRedDwarfMerchandise_total + 1 rsRedDwarfMerchandise.MoveNext Wend ' reset the cursor to the beginning If (rsRedDwarfMerchandise.CursorType > 0) Then rsRedDwarfMerchandise.MoveFirst Else rsRedDwarfMerchandise.Requery End If ' set the number of rows displayed on this page If (rsRedDwarfMerchandise_numRows < 0 Or rsRedDwarfMerchandise_numRows > rsRedDwarfMerchandise_total) Then rsRedDwarfMerchandise_numRows = rsRedDwarfMerchandise_total End If ' set the first and last displayed record rsRedDwarfMerchandise_first = 1 rsRedDwarfMerchandise_last = rsRedDwarfMerchandise_first + rsRedDwarfMerchandise_numRows - 1 If (rsRedDwarfMerchandise_first > rsRedDwarfMerchandise_total) Then rsRedDwarfMerchandise_first = rsRedDwarfMerchandise_total End If If (rsRedDwarfMerchandise_last > rsRedDwarfMerchandise_total) Then rsRedDwarfMerchandise_last = rsRedDwarfMerchandise_total End If End If %>
Red Dwarf Merchandise |
| Description | Picture |
<%=(rsRedDwarfMerchandise.Fields.Item("Type").Value)%> <%=(rsRedDwarfMerchandise.Fields.Item("Description").Value)%> <%=(rsRedDwarfMerchandise.Fields.Item("Notes").Value)%> |
|
| <%=(rsRedDwarfMerchandise_total)%> items listed | back |