Hi Guys,
I have a problem... I don't seem to get this "multiple" grouping right...
I have 5 tables... The first Table "News" and then 4 more that are in relation with "News" which are "GC, RE, LS, BS"
Anyways here is my Query:
CFQUERY DATASOURCE="#DNS#" name="datab">
SELECT *
FROM News, GC, RE, LS, BS
WHERE News.ID=GC.NID and News.ID=RE.NID and News.ID=LS.NID and News.ID=BS.NID
ORDER BY news.id asc
</CFQUERY>
I've already created the relations between every "NID" field and the "News.ID"
Now i cannot get the multiple grouping right! I keep getting multiple values back! Can someone please let me know if first there is something wrong with my Query, and second how do i get the multiple grouping right?
This is what i have right now:
<Cfoutput query="datab" group="ID">
bla bla
#NewsTitle#
<Cfoutput>#GeneralCategory#(from GC table)
#Region#(From RE Table)
#LearningSegment#(From LS table)
#BusinessSector#(from BS table)
</cfoutput>
</cfoutput>
Yea i know thats not how to do multiple grouping, but i can't figure it out anyways, i would REALLY appreciate it if you can help me out.
Thank you in advance,
Brad
I have a problem... I don't seem to get this "multiple" grouping right...
I have 5 tables... The first Table "News" and then 4 more that are in relation with "News" which are "GC, RE, LS, BS"
Anyways here is my Query:
CFQUERY DATASOURCE="#DNS#" name="datab">
SELECT *
FROM News, GC, RE, LS, BS
WHERE News.ID=GC.NID and News.ID=RE.NID and News.ID=LS.NID and News.ID=BS.NID
ORDER BY news.id asc
</CFQUERY>
I've already created the relations between every "NID" field and the "News.ID"
Now i cannot get the multiple grouping right! I keep getting multiple values back! Can someone please let me know if first there is something wrong with my Query, and second how do i get the multiple grouping right?
This is what i have right now:
<Cfoutput query="datab" group="ID">
bla bla
#NewsTitle#
<Cfoutput>#GeneralCategory#(from GC table)
#Region#(From RE Table)
#LearningSegment#(From LS table)
#BusinessSector#(from BS table)
</cfoutput>
</cfoutput>
Yea i know thats not how to do multiple grouping, but i can't figure it out anyways, i would REALLY appreciate it if you can help me out.
Thank you in advance,
Brad