Hi all,

Im not sure where to begin with coding this one. I want to output buttons for 
the next and previous row entry

For example if I had a client table, i could grab the client like this:

<cfquery name="getClient">
SELECT  clientID
        ,fname
        ,sname
FROM    tblCli
WHERE   clientID = <cfqueryparam value="#clientID#" cfsqltype="cf_sql_integer"/>
AND     otherfield = 'somevalue'
ORDER BY sname
</cfquery>

It has a little redundant code in at the moment as clientID would be the PK and 
return only one entry, but what if I wanted to get the next or previous ID 
value for the clients in the table?

I was thinking I'd need to do two left joins but couldn't figure out how to 
grab the higher/lower entry as defined by the "order by". 

Any ideas how to approach this?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269774
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to