What are the CFSQLType on QueryExecute

时间:2015-09-01 22:22:09

标签: coldfusion coldfusion-11

When I look at

QueryExecute ("select from Artists where artistid=? and country=?",
    [1, "USA"], {datasource="cfartgallery"});

I am wondering if artistid is queried as if were

<cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="1">

From https://wikidocs.adobe.com/wiki/display/coldfusionen/QueryExecute

1 个答案:

答案 0 :(得分:3)

If you need to provide additional attribute as a Query parameter (like CFSQLType, list, and separator), you can pass these as struct against that column name.

Example 2

QueryExecute("select from Employee where country=:country 
  and citizenship=:country", 
  {country={value='USA', CFSQLType='CF_SQL_CLOB', list=true}});

https://wikidocs.adobe.com/wiki/display/coldfusionen/QueryExecute