Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating category heading

Status
Not open for further replies.

mtarby

Programmer
Feb 19, 2003
89
US
I'm sure this will fall into the "things I should know", but I'm stuck. I'm trying to create a FAQ section where questions are organized by topic.

If this is my select statement

Code:
SELECT help_question, help_link, help_category, help_posted, help_answer FROM dbo.help_faq ORDER BY help_category, help_posted DESC

how can I create a heading that contains the value in the help_category for each unique category. In other words, what I want to end up with is "General" (one of the values in help_category) with the questions contained underneath.

I hope I'm making sense for a Monday!

Thanks in advance!

Michelle
 

open the recordset then

Store the category in a temporary var

dim tCategory
tCategory = ""


do while not rs.eof

If rs("help_category") <> tCategory Then
response.write rs("help_category") & "<br>"
End If

response.write rs("help_question") & "<br>"
etc,etc

tCategory = rs("help_category")

rs.MoveNext
Loop



I'm sure you get the picture


hth

simon

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top