Author: Steven Neiland

Warning: This blog entry was written two or more years ago. Therefore, it may contain broken links, out-dated or misleading content, or information that is just plain wrong. Please read on with caution.

A few weeks ago I needed to modify a list to wrap each list element with single quotes. Normally you would do this when outputting the data in a view but in this case that was not an option.

I was about to write a function to to this when I decided to take a chance that someone had already written this for me. A quick google later and I discovered that ColdFusion has a builtin function for exactly this purpose named "listQualify()".


unqualifiedList = "dog,cat,bird,pig";
qualifiedList = listQualify(unqualifiedList, "'");
unqualifiedList: dog,cat,bird,pig
qualifiedList: 'dog','cat','bird','pig'

It seems even after all these years I am still learning new things about cfml.

What Do You Think?

Reader Comments

sathya's Gravatar
Friday, May 15, 2015 at 7:45:57 AM EDT

how to insert multiple rows into single sql server

Post a Comment

Comment Etiquette:

  • Please keep comments on-topic.
  • Please do not post unrelated questions or large chunks of code.
  • Please do not engage in flaming/abusive behaviour.
  • Comments that contain or appear to be advertisments, will not be published.
  • Comments that appear to be created for the purpose of linkbuilding to commercial sites will be removed.

We are all adults here so play nice.


Archives Blog Listing

Tag Listing

Learn CF In A Week


Fork me on GitHub