Yep, more and more refinement. :-)
 
/charlie
 

  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dean H. Saxe
Sent: Thursday, July 26, 2007 10:13 PM
To: discussion@acfug.org
Subject: Re: [ACFUG Discuss] cfqueryparam in a sort


Charlie, 


Good idea.  Actually the numeric value can be used to do this too in what is
called the pattern of indirection.  Put all of the fixed values, i.e. the
order by clauses, into an array.  When the user selects a value it is the
ordinal position of the value in the array.  Before referencing the array
you can validate the value is numeric and between 0 and arrayLen - 1.  You
can safely reference the value directly in the cfquery at this point.


I commonly use this pattern for things like account numbers I am presenting
to a user, this is a good mechanism to prevent the user from attempting to
put in a value other than the ones presented to him on the form. 


-dhs






-------------------------------------------------------------
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------

Reply via email to