looping counting question

1. Senior Member
Join Date
Dec 1969
Posts
310

## looping counting question

I have a database table, which I loop through as follows:<BR><BR>----------------<BR><BR>&#060;% <BR>dim countRS <BR>countSQL = "SELECT fldCount, fldDate, fldTime FROM COUNT" <BR>set countRS = bConn.Execute(countSQL) <BR>%&#062; <BR>&#060;TABLE width="400"&#062; <BR> &#060;TR bgcolor="#000000"&#062; <BR> &#060;TH&#062;Hits&#060;/TH&#062; <BR> &#060;TH&#062;Date&#060;/TH&#062; <BR> &#060;TH&#062;Time&#060;/TH&#062; <BR> &#060;/TR&#062; <BR> &#060;% <BR>do while NOT countRS.EOF <BR>%&#062; <BR> &#060;TR&#062; <BR> &#060;TD&#062;&#060;%=countRS("fldCount")%&#062;&# 060;/TD&#062; <BR> &#060;TD&#062;&#060;%=countRS("fldDate")%&#062;&#0 60;/TD&#062; <BR> &#060;TD&#062;&#060;%=countRS("fldTime")%&#062;&#0 60;/TD&#062; <BR> &#060;/TR&#062; <BR> &#060;% <BR>countRS.MoveNext <BR>Loop <BR>%&#062; <BR>&#060;/TABLE&#062; <BR><BR>-------------------------<BR><BR>What I need to do is to be able, for each row, to work out the difference between the countRS("fldCount") value. So for e.g. if the value on row 5 = 50 and on row 60 it is 60, I want to return 10 and so on, just to work out the difference between each row as I loop through the table. <BR><BR>I can&#039;t work out how to do it though, can anyone help out my stupid head? <BR><BR>Thanks<BR><BR>Jim<BR>

2. Senior Member
Join Date
Dec 1969
Posts
96,118