Link to home
Start Free TrialLog in
Avatar of ronayers
ronayers

asked on

Get ID of previous record and Next record during CFoutput of a query

As i output a coldfusion query(multiple records) to the page how can i access the previous record and the next record as the data is written to the page?
Avatar of erikTsomik
erikTsomik
Flag of United States of America image

what you can do is the following
For  example you have a query qryTest
In order to get all records you do qryTest.recordcount, so if you need the record before you qryTest.recordcount -1 and qryTest.recordcount +1
try this approach and let me know if you need more help
Avatar of ronayers
ronayers

ASKER

hhh...without testing it that doesnt look like it will work. i thikn that will only add one or subtract one from the record count. shouldnt i be able to do something like qrytest.recordid[i] orsomething like that?
check out this tutorila it is similar to what you need
http://tutorial20.easycfm.com/
ASKER CERTIFIED SOLUTION
Avatar of gdemaria
gdemaria
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thats it! thanks.