Stored Procedure Parameter Code
I am new to CF and I am trying to understand some CFSTOREDPROC code. My question is withing this code there is sometimes a CFIF statement to determine how the CFPROCPARAM is set, whereas with other lines this is not done.
<CFPROCPARAM VALUE="#arguments.frmstruct.cutomerIdAutoValueContainer#" cfsqltype="CF_SQL_VARCHAR"
vs
<cfif
isdefined('arguments.frmstruct.SALESPERSON') and len(arguments.frmstruct.SALESPERSON) gt 1><cfelse>
<CFPROCPARAM VALUE="" cfsqltype="CF_SQL_VARCHAR">
</cfif>
Does this make sense to have the code like this and why? Couldn't we just have the CFPROCPARAM without the CFIF to test the value if GT 1?
i.e. <CFPROCPARAM VALUE="#arguments.frmstruct.SALESPERSON#" cfsqltype="CF_SQL_VARCHAR">
<CFPROCPARAM VALUE="#arguments.frmstruct.SALESPERSON#" cfsqltype="CF_SQL_VARCHAR">
