Questions tagged [cfqueryparam]

`` is a ColdFusion tag that is used to parameterize values that are used in the ``

Some of the benefits to using the <cfqueryparam> tag include:

  • All special characters are escaped
  • Protection against SQL injection attacks.
  • While ColdFusion is not strongly typed, SQL is. The CFSQLTYPE attribute converts the ColdFusion variables to the proper SQL type
  • NULLs can be handled separately from blank strings
  • ColdFusion lists can be converted for use in SQL Select IN statements
  • SQL can make better use of query plans

For more details

https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-p-q/cfqueryparam.html

For cfscript equivalent

https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-m-r/queryexecute.html

Also see

65 questions
0
votes
1 answer

ColdFusion looping over query with cfqueryparam

I am trying to loop over query with a nested query. The code that I have so far: SELECT image, imageHash FROM hashTable WHERE imageHash…
Roman
  • 1,118
  • 3
  • 15
  • 37
0
votes
1 answer

How to use cfqueryparam and NOT NULL

I have 2 queries and I want to use the tag on it but am not sure how to do it for this query: ThreeG IS NOT NULL AND
tan369
  • 162
  • 1
  • 1
  • 8
0
votes
1 answer

Dynamic tablename in DAO.cfc?

I'm writing a subsystem that tables might be renamed from project to project. Instead of asking the user of my subsystem to search & replace before using it, does this work? SELECT col1, col2, col3 …
Henry
  • 32,689
  • 19
  • 120
  • 221
0
votes
2 answers

Do I have to cfqueryparam or scope values from a query when I'm looping through it?

I'm was sitting forever on a Coldfusion8 INSERT into MySQL (5.0.88) The data came from a query named "q" like so: [Record # 1] ILN_KAEUFER: 9900000002985 ILN_VERKAEUFER: 9900000003005 Then I want to make an INSERT like so:
frequent
  • 27,643
  • 59
  • 181
  • 333
0
votes
2 answers

How to create a function in CFML within some SQL queries?

I would like to create a function in CFML taking 3 parameters (a number and two dates). The function will then perform a few cfquery queries on these data like SELECT, UPDATE and INSERT...Any idea on how to code this function ? I'm a cfml newbie so…
Stephane
  • 4,978
  • 9
  • 51
  • 86
1 2 3 4
5