Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Dec 2008
    Posts
    41
    Plugin Contributions
    0

    Default Error In SQL Syntax

    When I click on a manufacturer from the drop down list I get this error message:
    "1064 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 'from where manufacturers_id = 16' at line 2
    in:
    [select from where manufacturers_id = 16]"
    How do I fix this please?

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Error In SQL Syntax

    This sounds like the Table name define for the manufacturers table is not defined ...

    If you could go to your Tools ... Developers Tool Kit ... and in the bottom input box search on:
    define('TABLE_MANUFACTURERS'

    and select Catalog/Admin and click search ...

    What comes up for that?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Dec 2008
    Posts
    41
    Plugin Contributions
    0

    Default Re: Error In SQL Syntax

    I get this:

    /home/touring/public_html/includes/database_tables.php

    Line #49 : define('TABLE_MANUFACTURERS', DB_PREFIX . 'manufacturers');

    Thanks for any help.

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Error In SQL Syntax

    This makes it a little harder to find ...

    You have a syntax error on:
    select from where manufacturers_id = 16

    as there isn't a table name in it ...

    That makes it really really fun to try to find the error ...

    you can try a search on:
    where manufacturers_id =

    and see if any of the select statements that helps you find are missing a table name in them ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Dec 2008
    Posts
    41
    Plugin Contributions
    0

    Default Re: Error In SQL Syntax

    This is what I get when I search for where manufacturers_id =
    What am I looking for? I don't know what a table name is.

    /home/touring/public_html/admin/includes/functions/general.php

    Line #698 : where manufacturers_id = '" . (int)$manufacturer_id . "'

    /home/touring/public_html/admin/manufacturers.php

    Line #43 : where manufacturers_id = '" . (int)$manufacturers_id . "'");

    Line #52 : where manufacturers_id = '" . (int)$manufacturers_id . "'");

    Line #56 : where manufacturers_id = '" . (int)$manufacturers_id . "'");

    Line #94 : where manufacturers_id = '" . (int)$manufacturers_id . "'");

    Line #102 : where manufacturers_id = '" . (int)$manufacturers_id . "'");

    Line #104 : where manufacturers_id = '" . (int)$manufacturers_id . "'");

    Line #109 : where manufacturers_id = '" . (int)$manufacturers_id . "'");

    Line #118 : where manufacturers_id = '" . (int)$manufacturers_id . "'");

    Line #183 : where manufacturers_id = '" . (int)$manufacturers->fields['manufacturers_id'] . "'");

    /home/touring/public_html/admin/media_manager.php

    Line #118 : // where manufacturers_id = '" . (int)$manufacturers_id . "'");

    /home/touring/public_html/admin/product_types.php

    Line #112 : // where manufacturers_id = '" . (int)$manufacturers_id . "'");

    /home/touring/public_html/includes/modules/meta_tags.php

    Line #134 : $sql = "select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$include_manufacturers_id . "'";

    Line #156 : $sql = "select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'";

    /home/touring/public_html/includes/modules/pages/redirect/header_php.php

    Line #36 : WHERE manufacturers_id = :manufacturersID

    Line #49 : WHERE manufacturers_id = :manufacturersID

    Line #73 : WHERE manufacturers_id = :manufacturersID

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Error In SQL Syntax

    Do you get the error if you switch to the Classic Template?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7
    Join Date
    Dec 2008
    Posts
    41
    Plugin Contributions
    0

    Default Re: Error In SQL Syntax

    Yes I do.

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Error In SQL Syntax

    Only thing I can suggest then is to review the code for the sidebox for where it is missing the table name or get something like Beyond Compare from scootersoftware.com and compare the code from your site to a clean Zen Cart and see where your code has bad, missing or corrupt code ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. Replies: 1
    Last Post: 25 Aug 2011, 05:58 AM
  2. Error message 1064 you have an error in your sql syntax
    By honrheart in forum General Questions
    Replies: 1
    Last Post: 11 Sep 2009, 02:38 AM
  3. MySQL Error 1064 You have an error in your SQL syntax;
    By dmm2020 in forum General Questions
    Replies: 2
    Last Post: 22 Feb 2009, 05:02 AM
  4. error message 1064 you have an error in your sql syntax
    By ngsl in forum General Questions
    Replies: 0
    Last Post: 22 Aug 2008, 06:44 AM
  5. SQL Syntax error: check for right syntax to use near '000000
    By gabyone in forum General Questions
    Replies: 2
    Last Post: 9 Feb 2008, 08:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg