We recently upgraded to CF7 and MySQL 4.1, and the query below -- which worked fine under CF5 and MySQL 3.2 -- is failing now. Based on the error (below) it looks like a query error, but after going through the 4.1 docs I still can't see the problem. Any ideas why it's failing?
It throws this error:
Code:
<cfquery name="GetAssociatedTasks" DATASOURCE="#REQUEST.DataSource#">
SELECT task_id, report_id, project_cat, task, status, org
FROM tasks
WHERE report_id IN (#ValueList(GetReportID.report_id)#)
AND org LIKE '%Form.org%'
ORDER BY project_cat
</cfquery>
It throws this error:
Code:
Error Executing Database Query.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND org LIKE '%Form.org%' ORDER BY project_cat' at line 3
The error occurred in C:\Inetpub\[URL unfurl="true"]wwwroot\news\report_template.cfm:[/URL] line 21
19 : SELECT task_id, report_id, project_cat, task, status, org
20 : FROM tasks
21 : WHERE report_id IN (#ValueList(GetReportID.report_id)#)
22 : AND org LIKE '%Form.org%'
23 : ORDER BY project_cat
SQL SELECT task_id, report_id, project_cat, task, status, org FROM tasks WHERE report_id IN () AND org LIKE '%Form.org%' ORDER BY project_cat
DATASOURCE VGGG
VENDORERRORCODE 1064
SQLSTATE 42000
Please try the following:
* Check the ColdFusion documentation to verify that you are using the correct syntax.
* Search the Knowledge Base to find a solution to your problem.