Hi,
I have a table with client details ('clients') that is related to another
table with category info ('category').
Now, each client could have more than 1 category in there CategoryID Field.
the user will be clicking on a link which will have one CategoryID as a URL
variable, and the state where they are searching eg:
<A
HREF="Display.cfm?state=<cfoutput>#url.state#</cfoutput>&Category=2">categor
y</a>
Below is my attempt, but this doesn't seem to work. (dont laugh, it is all i
could think of)
so the problem is that CategoryID could resolve to, for example: '1,5,7,8'
and the url parameter will always be one number, how do i write the SQL for
this...
<cfquery datasource="#dsn#" Name="Business"
cachedwithin="#CreateTimeSpan(0,0,45,0)#">
SELECT ClientID,
BusinessName,
ContactName,
Address,
Suburb,
State,
PostCode,
PhoneNumber,
PhoneExt,
FaxNumber,
MobileNumber,
EmailAddress,
FunctionID,
CategoryID,
LogoPath,
IntroText
FROM Clients
WHERE '#Url.category#' IN (CategoryID) AND State = '#Url.State#'
</cfquery>
I hope someone can help......
thanks,
Chris Carpenter
WebMaster/IT Manager
ABC Interactive
http://www.abcinteractive.com.au
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.