Created
January 30, 2026 08:44
-
-
Save trycf/d75e31e16550c754db3877a8ea7540bc to your computer and use it in GitHub Desktop.
TryCF Gist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfscript> | |
| idList = "A1,A2,B1,B4,C6,A1,A2,B1,B4,C6"; | |
| writeOutput("Lista di id: #idList#<hr>"); | |
| writeOutput("Codice originale"); | |
| queryObj = queryNew("IDCODICE","VarChar"); | |
| for (item in listToArray(idList)) { | |
| qcr = queryAddRow(queryObj); | |
| querySetCell(queryObj, "IDCODICE", item, qcr); | |
| } | |
| writeDump(var=queryObj, label="queryObj"); | |
| writeOutput("<hr>Con for senza querySetCell"); | |
| queryObj2 = queryNew("IDCODICE","VarChar"); | |
| for (item in listToArray(idList)) { | |
| queryAddRow(queryObj2, {"IDCODICE" = item}); | |
| } | |
| writeDump(var=queryObj2, label="queryObj"); | |
| </cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment