Created
January 7, 2022 09:51
-
-
Save trycf/448b7d0817d3949b93bc5fa4f01bdbca 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> | |
employees = queryNew( 'name,age,email' | |
, 'varchar,integer,varchar' | |
,[ | |
[ 'John Doe',28,'John@company.com' ], | |
[ 'Jane Doe',22,'Jane@company.com' ], | |
[ 'Bane Doe',28,'Bane@company.com' ] | |
] | |
); | |
writeDump(employees); | |
</cfscript> | |
<cftry> | |
<!--commented line -- , email in select statement --> | |
<cfquery name="test" dbtype="query"> | |
select age | |
from employees | |
order by age; | |
</cfquery> | |
<cfdump var="#test#"> | |
<cfcatch> | |
<cfdump var="#cfcatch.message#"> | |
</cfcatch> | |
</cftry> | |
<cftry> | |
<!--commented line -- , email in ORDER By --> | |
<cfquery name="test" dbtype="query"> | |
select age | |
from employees | |
order by age -- ,email; | |
</cfquery> | |
<cfdump var="#test#"> | |
<cfcatch> | |
<cfdump var="#cfcatch.message#"> | |
</cfcatch> | |
</cftry> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment