Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CF7-MySQL4.1 Upgrade

Status
Not open for further replies.

CryoGen

MIS
Apr 15, 2004
86
US
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?

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.
 
looks like the problem is here:
Code:
WHERE report_id IN ()
the variable GetReportID.report_id does not appear to be set, and the query is expecting a value to be there


=========================================
I have not failed. I've just found 10,000 ways that won't work.
Thomas A. Edison
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top