Westside2004
asked on
StructFind Syntax?
Hi,
I am trying to use the function StructFind, but I think I have this syntax slightly off, I am hoping a second set of eyes can assist. I am doing an insert into the database. Here is the sql snippet. I am not using any named arguments into this CFC, so that is the reason the structure is called "arguments[1]". In any case, my problem seems to be related to my use of the # signs.
Is there anyone way to write this?
Thanks,
-ws
I am trying to use the function StructFind, but I think I have this syntax slightly off, I am hoping a second set of eyes can assist. I am doing an insert into the database. Here is the sql snippet. I am not using any named arguments into this CFC, so that is the reason the structure is called "arguments[1]". In any case, my problem seems to be related to my use of the # signs.
Is there anyone way to write this?
Thanks,
-ws
<cffunction name="doSomething" access="public">
<cfset var strResult = "" />
<cfloop from="1" to="3" index="i">
INSERT INTO TableA (
phase_description
)
VALUES(
'#StructFind(arguments[1], 'phase_description_' & "#i#" )#'
)
</cfloop>
<cfreturn strResult />
</cffunction>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks your code worked.
-ws