[Top] [All Lists]

recordset functions

Subject: recordset functions
From: "900spg"
Date: Wed, 8 Aug 2007 22:45:06 +0000 UTC
Newsgroups: macromedia.coldfusion.cfml_general_discussion
I have created a simple photo gallery page and I'm having trouble creating the 
dynamic navigation. I have a page that contains thumbnails of all of the images 
using the following code:
 <cfquery datasource="#datasource2#" name="getphotos">
 FROM w_photos
 WHERE event = '#url.e#'

 <cfset startRow=#StartRow_getphotos#>
        <cfset j = Ceiling(#getphotos.recordcount#/3)>
                <cfloop index="LoopCount" from="1" to="#j#">
                                 <cfoutput query="getphotos" 
maxRows="#MaxRows_getphotos#"><td align="center"><a 
class="text"><img src="/ac/images/galleryimages/thumbs/#getphotos.filename#" 
        <cfset startrow=(#StartRow#+3)>

 So on my displayimage.cfm page I would like to be able to provide next and 
previous navigation links that allow the user to  move forward or back through 
the full size images based on the order that the thumbnails were displayed on 
the previous page. I originally thought that I could use the id field and add 
orsubtract 1 value but that will not work as the next or previous id may be 
more than one unit away. Is there any function that will let me call the next 
or previous record in the recordset? Thanks in advance for any help. 

<Prev in Thread] Current Thread [Next in Thread>