Link to home
Start Free TrialLog in
Avatar of Westside2004
Westside2004Flag for United States of America

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



<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>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Mr_Nil
Mr_Nil
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Westside2004

ASKER

Yes, I removed that to simply my posting, I am using <cfqueryparam>

Thanks your code worked.

-ws