|
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.
|