Created
October 19, 2017 13:50
-
-
Save anonymous/4fb8ce152e74e978e2f788b375d8f34c 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> | |
query function combineQueries(required query q1, required query q2) { | |
return queryExecute( | |
"SELECT * FROM q1 UNION SELECT * FROM q2", | |
[], | |
{dbtype = "query", q1 = q1, q2 = q2} | |
); | |
} | |
q1 = queryNew("id,mi,en", "integer,varchar,varchar", [ | |
[1, "tahi", "one"], | |
[2, "rua", "two"] | |
]); | |
q2 = queryNew("id,mi,en", "integer,varchar,varchar", [ | |
[3, "toru", "three"], | |
[4, "wha", "four"] | |
]); | |
q3 = combineQueries(q1,q2); | |
writeDump([q1,q2,q3]); | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment