How many of the columns are needed?  If you only need a fw of the columns,
remove the extra columns and then loop over them regularily.  If you want to
group them, then use the group attribute in cfoutput, which isn't all that
cumbersome at all.  If you have duplicates, just make sure to use the
keyword "distinct" after "select" to remove them.

Teddy


On 11/2/06, daniel kessler <[EMAIL PROTECTED]> wrote:
>
> I'm joining 3 tables together (see below) that produces 4 records to
> represent the data in one form.
> This is 4 records because while there is one note (primary table), there
> are two attendees and two take_aways.  Each attendee and take_away have
> unique recordIDs associated with them.
> A dump of the data: http://hhp.umd.edu/dean/notes_dump.cfm
>
> I'm not sure how to work with the data.  Do I just use record 1 for
> anything I know is from the main table?  I tried grouping the data by
> relational table ID and output it (see cfoutput below) but it should have
> displayed two lines, I think and it displayed 4.  Should I forget grouping
> in cfoutput and just loop through the fields, checking whether the ID is an
> already used ID?  That seems cumbersome.  What do you do?
>
>
> <CFQUERY NAME="getItem" DATASOURCE="dpch">
>      SELECT n.n_r_id,n.meeting_name,a.n_r_attendees_id,a.fname,a.lname,
> t.n_r_takeaways_id, t.take_aways
>      FROM (notes_to_the_record n LEFT JOIN notes_to_the_record_attendees a
> ON a.n_r_id = n.n_r_id) LEFT JOIN notes_to_the_record_take_aways t ON
> t.n_r_id = n.n_r_id
>      WHERE n.n_r_id = #form.n_r_id#
> </CFQuery>
>
> -- there are two IDs here for four records.
> <cfoutput query="getItem" group="n_r_attendees_id">
> #fname# #lname#<br>
> </cfoutput>
>
> produced:
> my name 2 last 2
> My name last name
> my name 2 last 2
> My name last name
>
> daniel
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

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

Reply via email to