Created
June 10, 2021 03:32
-
-
Save trycf/4d19d49a7e14fa2c408ee228d9b49b7f to your computer and use it in GitHub Desktop.
TryCF Gist
This file contains 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> | |
records = queryNew( | |
"id,mi,en", | |
"integer,varchar,varchar", | |
[ | |
[1, javacast("null", ""), "one"], | |
[2, "rua", null()], | |
[null(), "toru", "three"], | |
[4, "wha", "four"] | |
] | |
); | |
writeDump(records) | |
function null(){ | |
return; | |
} | |
writeOutput("value: [#records.en[2]#] isNull: [#isNull(records.en[2])#]"); | |
writeOutput("<br/>"); | |
writeOutput("isNull(null()): " & isNull(null())); | |
writeOutput("<br/>"); | |
writeOutput("<br/>"); | |
writeOutput("<br/>"); | |
</cfscript> | |
<cfquery dbtype="query" name="filtered"> | |
SELECT * | |
FROM records | |
WHERE mi IS NULL | |
</cfquery> | |
<cfdump var="#filtered#" label="filtered results" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment