This content has been marked as final. Show 5 replies
The problem is here: WHERE ID = #ID#
Where are you defining a value for ID? Is it a form variable? You may need to define the scope, for example form.id or url.id
No this is not a form variable, it is the ID in the DB that is assigned for each record. What do I change it to to make this work. It is one page that will diplay 10 records at a time, then instead of hitting a next button, it has a numbered nav under the records breaking them down to 10 records per number. So basically it is one page doing all the work and when you click the number, I guess it would use the url id to make the records go to the next page of 10.
I've got 1 question.
In your query
SELECT ID, REMOTE_ADDR, HTTP_USER_AGENT, TRACK_DATE
WHERE ID = #ID#
Where does the #ID# come from?
You're also saying that "it is the ID in the DB that is assigned for each record".
What is actually generating the #ID#?
Is everything inside a <cfloop query="qGetID"> ... </cfloop>??
In this case it explains why you're getting an error "Variable ID is undefined" because in your code nothing is generating the #ID#
It's also a good practice to specify the scope of your variables e.g. variables.ID, form.ID, url.ID, etc
I've tried a similar example with Next, Previous links and it's working fine.
Here is the code below.
Hope this helps.
The ID field is an auto number assigned by the DB. It is an access DB.
I will try out this code you posted, and get back on after I test it.
Thank you, this works without using the ID from teh DB.