QueryExecute等效于新查询getPrefix()

时间:2019-10-08 22:30:59

标签: coldfusion cfml coldfusion-2016

我有一些现有代码

local.query = new Query();
local.query = setDataSource(application.DSN);
local.setSQL("
  SELECT ... 
  ");

local.result = local.query.execute(); // I am OK up to this point

local.prefix = local.result.getPrefix();

我了解这可以获取查询的元信息。

如何将其转换为

local.prefix = QueryExecute("
 SELECT ... 
 ",
 [],
 {datasource : application.DSN}
 ); 

现在呢?我在哪里getPrefix()

1 个答案:

答案 0 :(得分:0)

queryExecute()返回结果集

local.result = QueryExecute("
 SELECT ... ", [],
 {datasource : application.DSN}
 ); 

local.prefix = result.prefix