> I have this table that contains links that are put into 1 of about 10
> 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.
<cfquery name="Getlinks" datasource="hike">
SELECT *
FROM globallinkcatergory
ORDER BY Category, DisplayValue
</cfquery>
<ul>
<cfoutput query="getLinks" group="Category">
<li>#category#
<ul>
<cfoutput>
<li>#DisplayValue#</li>
</cfoutput>
</ul>
</li>
</cfoutput>
</ul>
Jochem
--
Who needs virtual reality
if you can just dream?
- Loesje
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

