Use CFQUERYPARAM as the DB engine will only compile you query once and
hopefully cache it. Otherwise it will re-compile every time.

TK
  -----Original Message-----
  From: Ian Skinner [mailto:[EMAIL PROTECTED]
  Sent: Monday, December 08, 2003 1:36 PM
  To: CF-Talk
  Subject: The Value of CFQUERYPARAM

  When writing a select statement, if I have a part of a WHERE clause that
  will be static, always the same value, and this value is not passed in
with
  a variable or constant, is there any inherent value in <cfqueryParam ...>
  tags?

  An Example:

  WHERE STATUS = <cfqueryParam value="M" ...>

  or

  WHERE STATUS = 'M'

  Is there any real advantage of one of these forms over the other?

  Just to repeat, these are hard coded, unchanging values NOT passed in with
  variables or constants.  I understand the value of the <cfqueryParam> tags
  in conjunction with passing in data with variables, especially data from
  user forms.

  --------------
  Ian Skinner
  Web Programmer
  BloodSource
  www.BloodSource.org
  Sacramento, CA

  Confidentiality Notice:  This message including any
  attachments is for the sole use of the intended
  recipient(s) and may contain confidential and privileged
  information. Any unauthorized review, use, disclosure or
  distribution is prohibited. If you are not the
  intended recipient, please contact the sender and
  delete any copies of this message.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to