> I'm trying to run a standard CFQUERY search using results found
> in a VERITY query. Heres what my code looks like:
> For some reason, I keep coming up with no results! What am I doing wrong?
> Any suggestions?
> -----------------------------------------------
>
> <CFSEARCH
> name = "GetResults"
> collection = "#SearchCollection#"
> criteria = "#ResumeKeyword#">
> <!--- Make a List of results--->
> <CFSET ResumeResults="">
> <CFOUTPUT QUERY="getresults">
> <CFSET ResumeResults=ListAppend(ResumeResults, "#getfilefrompath(key)#")>
> </cfoutput>
>
> <CFQUERY DATASOURCE="Stars" NAME="Talent">
> SELECT *
> FROM Talent
> WHERE TalentID=TalentID
> AND Resume IN ('#ResumeResults#')
> </cfquery>
OK, first of all, I'm assuming that Resume was the KEY that was built in the
CFIndex, if not, this won't work...
Next, if Resume is a text field it needs apostrophies around each entry, so
your ListAppend() needs to be;
<CFSET ResumeResults=ListAppend(ResumeResults, "'#getfilefrompath(key)#'")>
And then the WHERE needs to be;
AND Resume IN (#PreserveSingleQuotes(ResumeResults)#)
The reason for the PreserveSingleQuotes() is that they need to be escaped or
they won't be recognised by SQL...
Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133
"Websites for the real world"
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
> -----Original Message-----
> From: Dave Levin [mailto:[EMAIL PROTECTED]]
> Sent: 13 February 2001 23:32
> To: CF-Talk
> Subject: CAN I combine Verity results with a standard query?
>
>
>
> ---------------------------------------------------------
>
>
> Thanks,
> Dave :)
> [EMAIL PROTECTED]
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists