Attempting to query a article database. Displaying TOC and want to anchor
to article on same page. However when displaying the TOC, it shows the
link, but shows the same ID on every topic line. Any help from the pros out
there would be great.
Query code:
<cfquery name=get datasource="#DSN#">
Select *
From DatabaseTable678
Where categories = '1' or categories = '2' or categories = '3' or
categories = '4' or categories = '5'
order by categories
</cfquery>
This is my code for the TOC:
<h1>Table of Contents</h1>
<cfoutput query="Get" group="categories">
<b>#Get.categories#</b>
<ul>
<cfoutput>
<a href="###get.ID#"><li>#Get.topic#</li></a>
</cfoutput>
</ul>
</cfoutput>
<hr />
Content linking:
<cfloop query="get">
<div align="left" class="tbold"><cfoutput><strong>
<a name="ID">#topic#</a> </strong>| Question Number: #id# |
Category: #categories#</cfoutput> </div>
<hr align="center" width="100%" noshade>
<br>
<p class=tbold><strong>Question:</strong></p>
<p ><cfoutput>#ParagraphFormat(question)#</cfoutput></p>
<hr align="center" width="50%" noshade>
<p class=tbold><strong>Answer: </strong>
<p><cfoutput>#ParagraphFormat(answer)#</cfoutput></p>
<hr align="center" width="100%" noshade>
</cfloop>
--
Michael Brown
770-605-5240
Marketing Solutions with vision!
http://www.singleconcepts.com