• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Bug in CF11 regarding Query of queries syntax?

New Here ,
Aug 05, 2014 Aug 05, 2014

Copy link to clipboard

Copied

So I have decided to try CF11 because of an official outstanding CF10 bug.

Once I installed CF11, I get an error when running code like this:

<cfquery name="LOCAL.stat_questions" datasource="#APPLICATION.dsn#">

     SELECT     survey_questionID

     FROM     tbl_survey_questions

     ;

</cfquery>

<cfset LOCAL.this_statID = 1>

<cfquery name="LOCAL.subset" dbtype="query">

     SELECT     survey_questionID

     FROM          [LOCAL].stat_questions

     WHERE     survey_questionID = <cfqueryparam cfsqltype="cf_sql_numeric" value="#LOCAL.this_statID#">

     ;

</cfquery>

The error I receive is: "Query Of Queries syntax error.
  Encountered ";. "

If I remove the semi-colon... No error! Is this a bug, or was the semi-colon always bad, but just ignored?

Thanks


Views

1.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Aug 06, 2014 Aug 06, 2014

Votes

Translate

Translate
Adobe Employee ,
Aug 06, 2014 Aug 06, 2014

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 08, 2014 Aug 08, 2014

Copy link to clipboard

Copied

Hmmm. Learn something new everyday. When I read the issue my initial thought was that the semi-colon was a syntax error in the query string. I have never seen nor needed this in a CF query before. But since the bug link acknowledges it's a bug, I guess the semi-colon is valid. Just for clarification, can someone tell me why it would be used (since in this example the use is superfluous)?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 08, 2014 Aug 08, 2014

Copy link to clipboard

Copied

LATEST

I just always put it in out of habit from typing out actual MySQL queries (non QoQ). Never was a problem and I always did it. Now running CF11... it requires fixing. Thought it was strange.

I actually didn't even notice that the semi-colons weren't required in QoQ until I ran into this CF11 bug. I also notice the semi-colon isn't necessary for a MySQL query either in cfquery! Seems weird that it accepts them, but isn't required. Just ignores them?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation