Fixed
Details
Assignee
UnassignedUnassignedReporter
Imported User 97Imported User 97Priority
MajorLabels
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Details
Details
Assignee
Unassigned
UnassignedReporter
Imported User 97
Imported User 97Priority
Labels
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Created 9 March 2015 at 09:01
Updated 8 May 2020 at 19:39
Resolved 10 March 2015 at 08:55
The queryExecute functions allows for there to be invalid syntax in the parameter section and does not error. The following is not valid, however still executes without erroring:
```
queryExecute("
SELECT col1,
col2
FROM table
WHERE col_date > :varDate",
{varDate=arguments.aDate, cfsqltype="cf_sql_timestamp"}
);
```
The parameter "varDate" ends up with the value of arguments.aDate and it is escaped like it is a string, so you end up with something like:
'{ts ''2015-02-13 10:10:33''}'
Which of course is then not treated correctly by the SQL engine.
For reference the correct syntax is:
{varDate={value=arguments.aDate, cfsqltype="cf_sql_timestamp"}}