Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2009
    Posts
    6
    Plugin Contributions
    0

    Default 1064 - error in your SQL syntax

    I completely uninstalled and re installed zencart last night as it was giving me all sorts of errors. at the moment my database is not uploaded. My host is flexihosting, they say it’s a programming error..(i asked them to check out there side of things) I’ve read on the forum that it a cache problem but have no idea of how to fix it.


    Anyway after reinstalling the latest zencart using fantastico
    I still get the same error. i figured a reinstall should get rid of the problem

    It is as follows.


    Congratulations! You have successfully installed your Zen Cart™ E-Commerce Solution.
    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 'EXPECTED_PRODUCTS_SORT limit MAX_DISPLAY_UPCOMING_PRODUCTS' at line 5



    Zen Cart 1.3.8a
    Database Patch Level: 1.3.8
    v1.3.8 [2009-02-07 12:04:03] (Fresh Installation)
    v1.3.8 [2009-02-07 12:04:03] (Fresh Installation)
    PHP VERSION 5.2.6

    www.shanematts.com
    (australian user)

    regards and thanks in advance to any one who can suggest a solution as this has been an issue for months and i really need to get on top of it.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: 1064 - error in your SQL syntax

    Quote Originally Posted by shanematts View Post
    this has been an issue for months and i really need to get on top of it.
    What exactly has "been an issue for months"?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Feb 2009
    Posts
    6
    Plugin Contributions
    0

    Default Re: 1064 - error in your SQL syntax

    thanks for the reply,

    my site was never configured to except payments correctly so people could look but not buy stuff.. which is stupid

    now i have the time to get the site working properly.

    recently ( last 6 weeks) the above 1064 error was appearing, prices and pictures from my product page were not appearing and i could not navigate to other pages.
    sometimes it would work but 95 per cent it would not.

    i figured if i uninstalled and reinstalled zencart on the server the problem would be solved.

    the errors i was getting previously before i deleted my site were as follows


    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 'EXPECTED_PRODUCTS_SORT limit MAX_DISPLAY_UPCOMING_PRODUCTS' at line 5
    in:
    [select p.products_id, pd.products_name, products_date_available as
    date_expected, p.master_categories_id from products p, products_description pd
    where p.products_id = pd.products_id and p.products_status = 1 and
    pd.language_id = '1' and p.products_date_available >20080605235959 order by
    EXPECTED_PRODUCTS_FIELD EXPECTED_PRODUCTS_SORT limit
    MAX_DISPLAY_UPCOMING_PRODUCTS]



    and this one (which since reinstalling seems to be fixed.. it hink ?)


    Warning: Variable passed to each() is not an array or object
    in /home/shane/public_html/includes/classes/db/mysql/query_factory.php on line
    114

    Warning: session_start() [function.session-start]: Cannot send session cache
    limiter - headers already sent (output started
    at /home/shane/public_html/includes/classes/db/mysql/query_factory.php:114)
    in /home/shane/public_html/includes/functions/sessions.php on line 108

    Warning: Cannot modify header information - headers already sent by (output
    started
    at /home/shane/public_html/includes/classes/db/mysql/query_factory.php:114)
    in /home/shane/public_html/includes/init_includes/init_templates.php on line 78

    thank you for you help

    regards shanematts

  4. #4
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: 1064 - error in your SQL syntax

    Quote Originally Posted by shanematts View Post
    i figured if i uninstalled and reinstalled zencart on the server the problem would be solved.
    What version did you have before you uninstalled?
    Quote Originally Posted by shanematts View Post
    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 'EXPECTED_PRODUCTS_SORT limit MAX_DISPLAY_UPCOMING_PRODUCTS' at line 5
    in:
    [select p.products_id, pd.products_name, products_date_available as
    date_expected, p.master_categories_id from products p, products_description pd
    where p.products_id = pd.products_id and p.products_status = 1 and
    pd.language_id = '1' and p.products_date_available >20080605235959 order by
    EXPECTED_PRODUCTS_FIELD EXPECTED_PRODUCTS_SORT limit
    MAX_DISPLAY_UPCOMING_PRODUCTS]
    This thread points out two possible causes of that message: http://www.zen-cart.com/forum/showthread.php?t=117988
    a) database and/or hosting account out of disk space (used up allowed disk quota)
    b) bug in versions older than 1.3.8 ... link provided for the fix


    Quote Originally Posted by shanematts View Post
    and this one (which since reinstalling seems to be fixed.. it hink ?)


    Warning: Variable passed to each() is not an array or object
    in /home/shane/public_html/includes/classes/db/mysql/query_factory.php on line
    114

    Warning: session_start() [function.session-start]: Cannot send session cache
    limiter - headers already sent (output started
    at /home/shane/public_html/includes/classes/db/mysql/query_factory.php:114)
    in /home/shane/public_html/includes/functions/sessions.php on line 108

    Warning: Cannot modify header information - headers already sent by (output
    started
    at /home/shane/public_html/includes/classes/db/mysql/query_factory.php:114)
    in /home/shane/public_html/includes/init_includes/init_templates.php on line 78
    I would fully expect that if your hosting account upgraded to PHP5 and/or MySQL 5 but you were using an older version of Zen Cart which didn't support those. Upgrading to ZC v1.3.8 or newer should stop that message.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Feb 2009
    Posts
    6
    Plugin Contributions
    0

    Default Re: 1064 - error in your SQL syntax

    thank you dr byte, you pointed me in the right direction and for that i thank you.

 

 

Similar Threads

  1. Replies: 1
    Last Post: 2 Dec 2011, 07:22 AM
  2. Replies: 1
    Last Post: 25 Aug 2011, 05:58 AM
  3. Replies: 8
    Last Post: 28 Jun 2011, 08:42 AM

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