Print Page | Close Window

Display a single category?

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=10716
Printed Date: 08 April 2026 at 1:15pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Display a single category?
Posted By: CapnCrunch
Subject: Display a single category?
Date Posted: 03 June 2004 at 12:57pm

http://www.cpca.org/healthcollabs/forum/default.asp?C=3 - http://www.cpca.org/healthcollabs/forum/default.asp?C=3

 

As you can see from this link, what I am trying to do is get ONLY the toolbox category to display. Is there an easy way to do this?

 




Replies:
Posted By: dj air
Date Posted: 04 June 2004 at 6:03pm

the way i would do it have an identifier (c=3) and if that exists only call the category

the below should help you impliment what you want

-----------------------

just above the <html> tag of the default.asp page you will see the following code

'Read the various categories from the database
'Initalise the strSQL variable with an SQL statement to query the database


If strDatabaseType = "SQLServer" Then
 strSQL = "EXECUTE " & strDbProc & "CategoryAll"
Else
 strSQL = "SELECT " & strDbTable & "Category.Cat_name, " & strDbTable & "Category.Cat_ID FROM " & strDbTable & "Category ORDER BY " & strDbTable & "Category.Cat_order ASC;"
End If

(this method will only work on Access version)

chage the section of code for the below section

'Read the various categories from the database
'Initalise the strSQL variable with an SQL statement to query the database
If strDatabaseType = "SQLServer" Then
 strSQL = "EXECUTE " & strDbProc & "CategoryAll"
Else


 strSQL = "SELECT " & strDbTable & "Category.Cat_name, " & strDbTable & "Category.Cat_ID FROM " & strDbTable & "Category"

intQueryCatID = CLng(request.querystring("c"))

if intQueryCatID > 0 then strSQL = strSQL & " WHERE " & strDbTable &"Category.Cat_ID =" & intQueryCatID &""

strSQL = strSQL & " ORDER BY " & strDbTable & "Category.Cat_order ASC;"
End If

the above code will check to see if there is a selection and if so it will only get the selected category and none of the others.

I hope /think that is what you want. the above code should be copy and paste.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net