Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2006
    Posts
    10
    Plugin Contributions
    0

    Default SQL error from side box index

    Hello,

    I am having a SQL index problem when click a company from "Manufacturers" or "Record Companies" from the side boxes. When ever I click a company, it produces something like:

    Code:
    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 record_company_id = 2' at line 2
    in:
    [select from where record_company_id = 2]
    Please anyone show me what the problem is.
    Many thanks!

  2. #2
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default Re: SQL error from side box index

    Not sure but this query is wrong
    [select from where record_company_id = 2]

    It should be
    [select * from TABLE_NAME where record_company_id = 2]
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

  3. #3
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default Re: SQL error from side box index

    Read this:

    http://www.zen-cart.com/forum/archiv...p/t-45369.html

    run this SQL query
    In ur admin area SQL patch or Phpmyadmin

    #
    # Updating table `get_terms_to_filter`
    #
    ALTER TABLE get_terms_to_filter ADD get_term_table varchar(64) NOT NULL;
    ALTER TABLE get_terms_to_filter ADD get_term_name_field varchar(64) NOT NULL;
    UPDATE get_terms_to_filter SET get_term_table = 'TABLE_MANUFACTURERS', get_term_name_field = 'manufacturers_name' where get_term_name = 'manufacturers_id';
    UPDATE get_terms_to_filter SET get_term_table = 'TABLE_MUSIC_GENRE', get_term_name_field = 'music_genre_name' where get_term_name = 'music_genre_id';
    UPDATE get_terms_to_filter SET get_term_table = 'TABLE_RECORD_COMPANY', get_term_name_field = 'record_company_name' where get_term_name = 'record_company_id';
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

  4. #4
    Join Date
    Jun 2006
    Posts
    10
    Plugin Contributions
    0

    Default Re: SQL error from side box index

    Amazing!!!

    Thank you for the quick reply! It's fixed now. I love this place.

  5. #5
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default Re: SQL error from side box index


    Glad you got it fixed!
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

 

 

Similar Threads

  1. where is the SQL that controls what the categories side box outputs?
    By edwinx in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 20 Mar 2011, 05:50 AM
  2. Side Box Error
    By cs_jono in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 20 Apr 2010, 08:16 PM
  3. Removing categories side box from index page only
    By rack14650 in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 2 Apr 2009, 03:58 AM
  4. Make categories side box different from other side boxes
    By Jeff G in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 20 Nov 2007, 10:16 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