Title:
Bug 81153:We run an SQL query with the cfquery tag and if the results are empty, it destroys the variable it is supposed to be set to, rather than setting the variable to the empty query object
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): CHRIS LONG / Chris Long (ColdFusionSmurf)
Created: 12/11/2009
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 9,0,0,251028 / 270419
Priority/Frequency: Normal / Unknown
Locale/System: English / Win All
Vote Count: 1
Problem:
We run an SQL query with the cfquery tag and if the results are empty, it destroys the variable it is supposed to be set to, rather than setting the variable to the empty query object.This only seems to happen for us when the query is using a CONTAINS statement with double-quotes in the value. And then, only when you return no results.
Method:
Run the following code on a database table with an attached Full Text Index:<cfset variables.searchString = """jungle"" AND ""work from home""" /><cfquery name="rs" datasource="#variables.db_conn#"> SELECT * FROM JobsDatabase J WHERE CONTAINS (J.*, <cfqueryparam value="#variables.searchString#" cfsqltype="CF_SQL_VARCHAR" />)</cfquery><cfdump var="#variables.rs#" abort="yes">
Result:
Variable QRYSEARCHJOBS is undefined.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3040585
External Customer Info:
External Company:
External Customer Name: Chris Long
External Customer Email: 592B141D446C2DC7992016E5
External Test Config: 12/11/2009
Attachments:
Comments: