title: Coldfusion sql error only occurring on one instance of app
body: <p>I am running two instances of the same app, however only on one I get an error when trying to display unlabeled images.</p>
  
  <p>The log says:</p>
  
  <blockquote>
    <p>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 '' at line 3 The specific sequence of files
    included or processed is:
    [obscured]...images_archive.cfm,
    line: 24</p>
  </blockquote>
  
  <p>Line 24 of this file is:</p>
  
  <pre><code>WHERE &lt;cfloop query="unlabeledTags"&gt;tagID &lt;&gt; #ID#&lt;cfif #currentRow# NEQ #recordCount#&gt; AND &lt;/cfif&gt;&lt;/cfloop&gt;
  </code></pre>
  
  <p>Any help much appreciated</p>