Title:
Bug 80191:If you use a named param twice, then CF throws an error when you execute the query:
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Raymond Camden / Raymond Camden (Raymond Camden)
Created: 09/26/2009
Components: Language, Functions
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 / 270417
Priority/Frequency: Normal / Unknown
Locale/System: English / Platforms All
Vote Count: 1
Problem:
If you use a named param twice, then CF throws an error when you execute the query:
Method:
<cfscript>q = new com.adobe.coldfusion.query();q.setDatasource("cfartgallery");q.setSQL("select * from art where artname like :search or description like :search ");q.addParam(name="search", value="s", cfsqltype="cf_sql_varchar");results = q.execute();writeDump(results);</cfscript>
Result:
The SQL specified in the query <p>select * from art where artname like :search or description like :search .</p>You can use addParam() on the query object to add a queryparams (params by name and/or params by position)
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3040208
External Customer Info:
External Company:
External Customer Name: Raymond Camden
External Customer Email: 5FBC41E943BD265C992015D5
External Test Config: 09/26/2009
Attachments:
Comments: