- see footer for list info -<
Hi all
I have been playing around with this with arrays and all sorts but its not
the answer. I seem to be duplicating waht I already have. I think the answer
lies in some clever looping ....
I already have the data I want in a table like this
BullyingTypeIDPK IncidentIDFK BullyingTypeIDFK
237 243 1
238 243 6
239 244 3
240 245 1
241 246 1
So there are 4 incidents recorded 243 - 246. 243 has 2 bullying types
associated with it.
I want to show these types in a table that is 6 columns wide so in position
1 would be 243 (1) and in position 6 would be 243 (6) with spaces in between
Like this ...
Incident ID header1 header2 header3 header4 header5 header6
243 1
6
244 3
245 1
246 1
I can't get my head around how I need to loop and how to insert <td>'s where
needed ...
The code so far ...
<cfquery name="Report1" datasource="#Application.RacistDSN#">
SELECT tblIncidents.IncidentIDPK,
tblIncidents.DFESNo,
tblIncidents.IncidentDate,
tblBullyingTypes.BullyingType
FROM tblIncidentToBullying
INNER JOIN tblBullyingTypes ON tblIncidentToBullying.BullyingTypeIDFK =
tblBullyingTypes.BullyingTypeIDPK
INNER JOIN tblIncidents ON tblIncidentToBullying.IncidentIDFK =
tblIncidents.IncidentIDPK
ORDER BY IncidentIDPK
</cfquery>
<cfoutput query="Report1">
<p>
IncidentID = #IncidentIDPK# <br />
Bullying type = #BullyingType# <br />
</p>
</cfoutput>
Can anyone help me loop this and show the table please
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:-
- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<