Skip to content
Advertisement

How to mimic sql statement logic in cfml / coldfusion?

I Am coming to a problem where I am trying to convert my sql statement to do the same logic in cfml (cfscript>) so, I am trying to mimic this sql statement to display the results inside my cfscript. can somebody help me solve this issue? thanks for the help.

SQL:

Advertisement

Answer

@Scott, I am assuming that:

  1. Each row from your select query represents a JSON similar to the one you have shown. After all, the column names match the keys in the JSON.

  2. You already have or intend to have a number of such JSONs stored, each as a file. I infer this from your file-read code. Let’s say the files are stored in a directory called ‘jsons’.

  3. What you are looking for is ColdFusion code that will select the JSON files that match the criteria in your select query.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement