Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trycf/4d19d49a7e14fa2c408ee228d9b49b7f to your computer and use it in GitHub Desktop.
Save trycf/4d19d49a7e14fa2c408ee228d9b49b7f to your computer and use it in GitHub Desktop.
TryCF Gist
<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