Basic Basic <CFQUERY name="local.getBaBusList" datasource="#Request.CompanyEHS_ODBC#"> SQL…… </ CFQUERY> 注意 name 不要加井号 cfqueryparam <cf_queryparam list="true" separator="|" value="#Attributes.limitToBusinessList name="Top5Site" datasource="#ODBC#"> select top(5) s.location Site FROM …… </cfquery> 大括号相关 有时候 ; </cfquery> 使用方法 CF: 一般搜索结果会有很多行, 因此只需要使用循环输出 <cfloop index="i" from="0" to="10"> <cfoutput> # 动态输出 dynamic output for cfquery 注意输出时的循环不能使用 loop in list query[col][row] for (var index = 1; index
static void main(String[] args) throws Exception { // 第一个任务: CompletableFuture<String> cfQuery CompletableFuture.supplyAsync(() -> { return queryCode("中国石油"); }); // cfQuery 成功后继续执行下一个任务: CompletableFuture<Double> cfFetch = cfQuery.thenApplyAsync(T::fetchPrice); /code/"); }); // 用anyOf合并为一个新的CompletableFuture: CompletableFuture<Object> cfQuery https://finance.sina.com.cn/price/"); }); CompletableFuture<Double> cfFetchFrom163 = cfQuery.thenApplyAsync
startRow = "row number" endRow = "row number"> </cfloop> Example 从 cc_TEST 表中搜索前十个数据, 放到 TEST 的 <cfQuery cfloop query="TEST"> 的 query 属性中不需要添加井号 在 <cfloop> 内部语句需要使用 <cfoutput> 进行转换, <cfoutput> 可以放在外层以减少使用次数 <cfquery name="query" datasource="cc_query" result="result"> SELECT TOP(10) * FROM SITE </cfquery> <cfdump
--- <cfheader name="Content-Type" value="application/json"> ---> <cfquery name="getSites" datasource =""> …… </cfquery> <cfcontent reset="true" /> <cfoutput> #SerializeJSON(getSites,true) # </cfoutput> Query of Query <cfset subCategoryIDs=valueList(getsubcategories.subCategoryID)> <cfquery (<cfqueryparam cfsqltype="cf_sql_integer" value="#subCategoryIDs#" list="true">) ORDER BY RAND() </cfquery name="query" datasource="CC_TEST"> select top(3) * from ltbContact; </cfquery> <cfdump var="#query
struct 来使用了 对于 object[index] 的 index 应该是数字而不是字符串# The request has exceeded the allowable time limit Tag: CFQUERY 一般是因为将 cfquery 的 name 作为了表名, 因此 JOIN 和 INNER JOIN 的时候无法分析出来 解决方法 使用临时表, CTE 或者变量表, CTE 优先 有时候如果是单个 cfquery
." &
"
"
);
} <
/cfscript >
Personal Example:
<cfquery name="q" datasource="#cc_odbc 里面变为双引号
解决方法 中间加一个 Replace
<cfquery name="string_with_single_quote" datasource="schema_user" result ="my_result"> #REReplace(string_variable,"''","'","ALL")#
</cfquery>
replace
Argument Reference
| Name 一般 QoQ 报错很有可能就是 SQL 格式出错, 找一下是否存在错误的用法改掉即可
----
listToArray