Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to put a counter on result ?

Status
Not open for further replies.

aiyayo

Programmer
Aug 30, 2001
5
CA
Hi everyone,

I want to put a counter on each result where appear on html. For example, after I exec a SQL command, it will returns 53 rows, and I want my result appear like the following in HTML.

53. result[1] <-- first result return from SQL
52. result[2]
51. result[3]
...
...
3. result[52]
2. result[53]
1. result[54] <-- last result return from SQL

I try DBCount, but it always return -1, anyone can help me please.
 
Hi,

Declare a variable to get the number of the records selected for the SQL command, and append
VariableCount - Index of the result before result.

I hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top