Note that there are some explanatory texts on larger screens.

plurals
  1. POColdfusion query weird characters
    primarykey
    data
    text
    <p><strong>Problem</strong></p> <p>My (windows) server is showing an odd error when I use a query. However locally the query works just fine. The server adds  everywhere in the query.</p> <p><strong>The Error</strong></p> <blockquote> <p>Error Executing Database Query.</p> <p>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 '.product = ao_products.id where ao_ranks.target = '1' order by ao_ranks.rank as' at line 1</p> <pre><code>&lt;cfset start = (page*perpage)-perpage&gt; &lt;cfquery name="get"&gt; select category,ao_products.id,model,name,rank,rating </code></pre> <p>from ao_ranks inner join ao_products on ao_ranks.product = ao_products.id where ao_ranks.target = '#target#' order by ao_ranks.rank asc limit #start#,#perpage# </p> <p>VENDORERRORCODE 1064</p> <p>SQLSTATE 42000</p> <p>SQL select category,ao_products.id,model,name,rank,rating from ao_ranks inner join ao_products on ao_ranks.product = ao_products.id where ao_ranks.target = '1' order by ao_ranks.rank asc limit 0,16</p> </blockquote> <p><strong>The Code (utf-8 encoded file)</strong></p> <pre><code>&lt;cfelse&gt; &lt;cfset start = (page*perpage)-perpage&gt; &lt;cfquery name="get"&gt; select category,ao_products.id,model,name,rank,rating from ao_ranks inner join ao_products on ao_ranks.product = ao_products.id where ao_ranks.target = '#target#' order by ao_ranks.rank asc limit #start#,#perpage# &lt;/cfquery&gt; &lt;/cfif&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload