Omar's, "Number Count Beside Each Record", used w/ Thomas Muck's, "Recordset Navigation Suite" extension

April 12, 2002 by webmaster mr

Recordset Navigation extension (ie. Links List: 1-10 | 11-20 | 21-30 | 31-40
Pages List: 1 | 2 | 3 | 4
Navigation Links: First | Previous | Next | Last )

<%dim offset
offset = request.querystring("offset") 
%>

<%dim i
if offset = "" or offset = "0" then
i = 1
else
i = offset+1
end if
%>

<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>

<%=i %> <%=(Recordset1.Fields.Item("ColumnName").Value)%>  <br>

<%
  repeat1__index="Repeat1__index"+1
  repeat1__numrows="Repeat1__numRows"-1
  i = i + 1
  Recordset1.MoveNext()
Wend
%>

Number Count beside Each Record

July 13, 2004 by eric edyson

This is just what I was looking for, however I cannot get the code to start at "1" instead of it starting at "0".  Also, when I add the code to the location displayed in the article, my page will not run.  Any suggestions??

<%
Dim i
i = 1
%>

 

Great Work

January 14, 2006 by Jeremy Conn
Very useful and much appreciated.

PHP?

March 15, 2008 by student 101

 

This is cool, what about a PHP version?
Getting this code to work in PHP is not that easy, any ideas?