queryExecute ColdFusion syntax vs Railo/Lucee syntax -
i have bunch of code has been written against railo server. trying move of code on cf11 box , lucee box.
i have been using queryexecute this:
rt = queryexecute( sql = 'select * translation translationid = :translationid , translatedstr = :translatedstr' , params = {translationid: arguments.translationid , translatedstr: arguments.translatedstr} , options= {datasource: application.ds} );
i under impression syntax same on cf11 getting error :
parameter validation error queryexecute function. built-in coldfusion function cannot accept assignment statement parameter, although can accept expressions. example, queryexecute(d=a*b) not acceptable.
the above executequery works fine on lucee. going need go through whole code base , make work on both cf11 , on lucee.
can someone, more familiar acf, tell me best way this. appears acf having trouble param names. if remove sql =
, params =
takes away of problem, although readability of having them named. appears acf doesn't translationid: arguments.translationid
, wants me change translationid = arguments.translationid
. want make sure there isn't missing before go through time consuming process of making changes.
pretty sure parameters need in form of structure include value (and query param if choose).
try this:
rt = queryexecute( "select * translation translationid = :translationid , translatedstr = :translatedstr", { translationid: {value: arguments.translationid}, translatedstr: {value: arguments.translatedstr} }, {datasource: application.ds} );
Comments
Post a Comment