Incrementing
I have the following code that is not doing what it should be, i can't understand why. It connects but doesn't increment the value. Code:
I have the following code that is not doing what it should be, i can't understand why. It connects but doesn't increment the value. Code:
im trying to create an add feature in which i can add new people records to a access database. Each person belongs to a specific dept based on name. However my problem is i need to have a number increment feature- which increments each time i add a new person to a department. Each department will have its own increment of people. How could i implement this?
e.g. art dept having people starting from 0- 6, math dept having people starting from 0-4. any coding or advice.
Is there an equivalent of the += method (C/C#) or am I basicaly stuck doing:
counter = counter + x?
I've inherited some ASP code which I'm not entirely sure about (I'm a Cold Fusionneer for my sins), and was wondering if somebody could help me make a slight code alteration that is required?
Basically, my code is :
If Not(objRetrieve.BOF AND objRetrieve.EOF) Then
Do While Not objRetrieve.EOF
%>
<%="&name"%><%=trim(objRetrieve("Players_ID"))%>=<%=trim(objRetrieve("Players_ Name"))%>
<%
objRetrieve.Movenext
Loop
End If
However, where I currently have <%=trim(objRetrieve("Players_ID"))%> I'd instead like to auto-increment that number each time. So on the first loop it would be 1, then 2, then 3, etc.
I've got a general query here about how to structure some code. I want to repeat a region (a table row) to create a numbered list of however many records are in the recordset.
I can repeat the region just fine, but how would I increment the number from 1 to x at record? And how could I reverse the list so it counted down from x to one? Does that make sense? i.e both
Sales Targets - Top 10
1. Ian
2. Jenny
3. Fred
etc and
Sales Targets - Biggest Losers
24. Susan
23. Graham
22. Andy
I have a counter (alright one I found on asp101.com) that checks for a
session variable to prevent the counter from incrmenting if a user refreshes
the page or returns to the page during the same session. The problem is, it
also prevents other page counters from incrementing. Here's the code for
this part: Code: