categories.
The table structure is as follows:
Auto-number (Identity Column) | Category Value | HttpLink | DisplayValue
for Link| UserID | DateTime | Available
The output I was looking for and got is:
Category1
Link1
Link2
Link3
Category2
Link1
Link2
CategoryN
Link1
Link2
How I got this is very suspect. Not really looking to take up anyone's
time with specific code about how this should be done necessarily but
wondering how should this be structured? I don't know if that makes
sense. I just can't believe this is write though it is how my mind saw
it. :-) I can't see how to otherwise group the links by category unless
I created one query per each category---which is essentially what I did.
How whack is this?
Thanks,
John
<cfquery name="Getlinkcatergory" datasource="hike">
SELECT * from globallinkcatergory
</cfquery>
<!--- The above gets the categories --->
<cfloop from="1"
to="#getlinkcatergory.recordcount#" index="i">
<cfquery name="GetLinks"
datasource="hike">
SELECT * from
globallinks
where catergoryheading =
'<cfoutput>#getlinkcatergory.linkcatergory[i]#</cfoutput>'
order by displayvalue
</cfquery>
<strong><cfoutput>#getlinkcatergory.linkcatergory[i]#</cfoutput>:</stron
g>
<p></p>
<cfoutput
query="GetLinks">
<table
width="100%" border="0" cellpadding="2" cellspacing="0">
<tr bgcolor="###iif(currentrow MOD
2,DE('ffffff'),DE('efefef'))#">
<td><a href="">
</tr>
</table>
</cfoutput>
<hr width="100%">
</cfloop>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

