- see footer for list info -<
Just thought about this and came up with the following.

Im not sure if this will work ok - I would appreciate any comments ...

<!--- How many Victims are recorded? --->
                                <cfquery name="GetVictims" 
datasource="#Application.RacistDSN#">
                                        SELECT dbo.tblVictims.VictimIDPK
                                        FROM dbo.tblVictims
                                        WHERE (dbo.tblVictims.IncidentIDFK = 
'#session.recordtomodify#')
                                </cfquery>
                                <cfset NumberOfVictims = 
#GetVictims.RecordCount#>

                                <!--- Create a list to hold the record id's of 
those records --->
                                <cfset VictimIDList = 
ValueList(GetVictims.VictimIDPK)>

                                <cfoutput>
                                        Number of victims - 
#NumberOfVictims#<br>
                                        Victim ID's - #VictimIDList#<br>
                                </cfoutput>

<!--- Set a default url.value to 1 and increment this when the user clicks the next
                                victim button ---->
                                <cfparam name="url.ElementToGet" default="1">

<!--- Now get the record ID from the list dependant on what the URL value
                                is set to --->
                                <cfset recordtoGet = #ListGetAt(VictimIDList, 
url.ElementToGet)#>

                                <cfoutput>Record fetched will be 
#recordtoget#</cfoutput>

Regards - Paul


_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to