尝试执行以下代码时出现错误:
myQuery = queryNew("id,name,amount","Integer,Varchar,Integer",
[
{id=1,name="One",amount=15},
{id=2,name="Two",amount=18},
{id=3,name="Three",amount=32},
{id=4,name="Four",amount=27},
{id=5,name="Five",amount=43},
{id=6,name="Six",amount=71}
]);
get=myQuery.filter(function(obj){
return (order by obj.name )
});
writeOutput("The filtered query is:")
writeDump(get);
错误显示“在第 16 行第 22 列找到无效的 CFML 构造”。
我知道上面的错误是因为 obj.name 作为返回参数的 order。但是我怎么能没有任何错误呢?谢谢你。