Hi,
It seems like nothing is working for me. I've got help from two people already but neither of the solutions have worked for me. So im gonna post with ALL the details and see if anyone can help me.
I have Five tables: News, GC, RE, LS, BS
News is the main table... Here are the full tables:
-----
*News
ID(auto) NewsTitle
2 hello world
*GC
ID(auto) NID(News.ID) GeneralCategory
1 2 General
2 2 Services
3 2 Hosting
*RE
ID(auto) NID(News.ID) Region
1 2 Canada
2 2 US
*LS
ID(auto) NID(News.ID) LearningSegment
1 2 eLearning
2 2 online
*BS
ID(auto) NID(News.ID) BusinessSector
1 2 General
2 2 Small
-----
Those are my 5 categories... Here is my query (keeping in mind that i have already setup the table relations between EVERY NID field{in GC, RE, LS, BS} and NEWS.ID)
<CFQUERY DATASOURCE="#DNS#" name="datab">
SELECT DISTINCT *
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
</CFQUERY>
And here is what the grouping method that was suggested but doesn't work:
<Cfoutput query="datab" group="ID">
bla bla
#NewsTitle#
<Cfoutput group="GeneralCategory">
#GeneralCategory#
<cfoutput group="Region">
#Region#
<cfoutput group="LearningSegment">
#LearningSegment#
<cfoutput group="BusinessSector">
#BusinessSector#
<cfoutput>
<!--Include in here the thing that
you want to see after your last
grouping --> (I dunno what this means)??
</cfoutput>
</cfoutput>
</cfoutput>
</cfoutput>
</cfoutput>
</cfoutput>
Now this doesn't work for me. I don't know why??? I keep getting MULTIPLE values(repeated) so i can't get the grouping to work at all. Can somebody look over my situation and let me know what im doing wrong? I feel so stupid, cause i've been asking for help on this matter for so many times and i still can't get it right.
I REALLY appreciate anyone for taking the time to answer me, i owe you big time. And again THANK YOU TONS to the people who have helped me on this forum! You guys/gals are the best!!!
Much Thanks,
Brad
It seems like nothing is working for me. I've got help from two people already but neither of the solutions have worked for me. So im gonna post with ALL the details and see if anyone can help me.
I have Five tables: News, GC, RE, LS, BS
News is the main table... Here are the full tables:
-----
*News
ID(auto) NewsTitle
2 hello world
*GC
ID(auto) NID(News.ID) GeneralCategory
1 2 General
2 2 Services
3 2 Hosting
*RE
ID(auto) NID(News.ID) Region
1 2 Canada
2 2 US
*LS
ID(auto) NID(News.ID) LearningSegment
1 2 eLearning
2 2 online
*BS
ID(auto) NID(News.ID) BusinessSector
1 2 General
2 2 Small
-----
Those are my 5 categories... Here is my query (keeping in mind that i have already setup the table relations between EVERY NID field{in GC, RE, LS, BS} and NEWS.ID)
<CFQUERY DATASOURCE="#DNS#" name="datab">
SELECT DISTINCT *
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
</CFQUERY>
And here is what the grouping method that was suggested but doesn't work:
<Cfoutput query="datab" group="ID">
bla bla
#NewsTitle#
<Cfoutput group="GeneralCategory">
#GeneralCategory#
<cfoutput group="Region">
#Region#
<cfoutput group="LearningSegment">
#LearningSegment#
<cfoutput group="BusinessSector">
#BusinessSector#
<cfoutput>
<!--Include in here the thing that
you want to see after your last
grouping --> (I dunno what this means)??
</cfoutput>
</cfoutput>
</cfoutput>
</cfoutput>
</cfoutput>
</cfoutput>
Now this doesn't work for me. I don't know why??? I keep getting MULTIPLE values(repeated) so i can't get the grouping to work at all. Can somebody look over my situation and let me know what im doing wrong? I feel so stupid, cause i've been asking for help on this matter for so many times and i still can't get it right.
I REALLY appreciate anyone for taking the time to answer me, i owe you big time. And again THANK YOU TONS to the people who have helped me on this forum! You guys/gals are the best!!!
Much Thanks,
Brad