Skip to main content
Inspiring
May 26, 2011
Answered

value in CFQUERYPARAM

  • May 26, 2011
  • 1 reply
  • 1396 views

I'm cleaning up some codes and start using <cfqueryparam> tags in all the queries.

There is one query that I'm not 100% sure how to convert to cfqueryparam :

INSERT INTO sometable (Column_1,Column_2, .......)

VALUES ( '#Value_1#', '#Value_2# #Value_3#', ......)

The value inserted into Column_2 shows ' #value_1# #value_3# '

Should I use it this way in cfqueryparam:

<cfqueryparam cfsqltype="cf_sql_varchar" value="#value_1# #value_2#"> ? will this be a proper way to do it?

This topic has been closed for replies.
Correct answer Owainnorth

That is correct.

1 reply

Owainnorth
OwainnorthCorrect answer
Inspiring
May 26, 2011

That is correct.

Inspiring
May 26, 2011

One value per CFQUERYPARAM tag, surely?!

--

Adam

Community Expert
May 26, 2011

No, not necessarily. There's nothing wrong with concatenating values to build a single field, which is what the OP is doing.

Dave Watts, CTO, Fig Leaf Software

http://www.figleaf.com/

http://training.figleaf.com/

Dave Watts, Eidolon LLC