Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Aug 2006
    Location
    UK
    Posts
    22
    Plugin Contributions
    0

    MySQL syntax error

    I hope I'm posting this in the right area, apologies if i haven't.

    Using the newest ZC version this error is appearing after I install a new category:

    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 '' at line 10
    in:
    [select p.products_id, pd.products_name, products_date_available as date_expected from products p, products_description pd, products_to_categories p2c, categories c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '67' and p.products_date_available >=20061001 and p.products_id = pd.products_id and p.products_status = 1 and pd.language_id = '1' order by date_expected desc limit ]


    The error will disappear if I remove all but one product (doesn't matter which product as long as there is only one).

    I have searched the forum for similar problems but have drawn a blank. Please can someone point me in the right direction as I don't know whether I should be looking in Zen-Cart or MySQL. (Knowledge of MySQL = 0)

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

    Default Re: MySQL syntax error

    What version of Zen Cart are you running?

    Was this a clean install or an upgrade?

    If an upgrade what version were you and how did you do the upgrade?

    This looks like old code on the /includes/modules/upcoming_products.php
    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: v1.5.5]
    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
    Aug 2006
    Location
    UK
    Posts
    22
    Plugin Contributions
    0

    Default Re: MySQL syntax error

    Latest version, new install. I did have a previous version but as I hadn't really got to grips with it I wiped it from the server (including all old database). I am using the Simple_Zen template.

  4. #4
    Join Date
    Aug 2006
    Location
    UK
    Posts
    22
    Plugin Contributions
    0

    Default Re: MySQL syntax error

    Hm. Thanks for the prompt re upcoming products. I've just had a poke around Configuration>New Products module which was blank. If I put a zero there the error disappears. Thanks very much for the speedy help!

  5. #5
    Join Date
    Sep 2006
    Posts
    142
    Plugin Contributions
    0

    Default Re: MySQL syntax error

    Hello...

    I'm getting this same exact error.

    It only happens when i click on NEW PRODUCTS link in the store, and I desperately need it fixed!

    I'm not sure what you mean that when you put 0 in newproducts_php file that fixed the problem....

    Can someone please help??

    My exact error is:
    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 ':1' at line 10
    in:
    [SELECT p.products_id, p.products_type, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status FROM products p LEFT JOIN manufacturers m ON (p.manufacturers_id = m.manufacturers_id), products_description pd WHERE p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 order by p.products_date_added DESC, pd.products_name limit 0, 4:1]


    The other odd thing that just started happening today is the FILTER dropdown menu is all weird....The advanced search dropdown has this in there: TEXT_PRODUCTS_LISTING_ALPHA_SORTER and the same text showing underneath the drop down box. This was never there before!


    Yesterday, I added two modules, the scrolling specials one, and another one the Expanded categories. The Scrolling Specials one works perfect, but the expanded categories didn't seem to do anything different to the page.

    I also made adjustments in the cart to the number of featured products per row, and how many to show on the page. I didn't notice the error until today, so it was several hours after I had made the other changes.

    This is on a clean install of the Zen Cart that was released in October, I haven't upgraded to the latest release with the Paypall Express Checkout.

    Can anyone help me figure out what I did to mess up my New Products page? I even went in and reuploaded a fresh newproducts_php file to the server, but that didn't work! (If you can't tell already, I usually only make changes from the admin screens, and not much else, so please speak in simple terms for me!)

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

    Default Re: MySQL syntax error

    Not sure what you have configured to produce:
    limit 0, 4:1
    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: v1.5.5]
    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
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: MySQL syntax error

    Also, is you are seeing:
    TEXT_PRODUCTS_LISTING_ALPHA_SORTER

    Then you have not upgraded your language files and possibly your code right ...

    I would recommend using Zen Cart v1.3.7 and upgrading to it would probably help clear up these errors ...

    NOTE: backup both your site and database and we do not recommend upgrading a Live site ...

    A search on:
    /new_shop

    Has many many posts on how to do a careful upgrade with a new directory and database ...
    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: v1.5.5]
    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!

  8. #8
    Join Date
    Aug 2006
    Location
    UK
    Posts
    22
    Plugin Contributions
    0

    Default Re: MySQL syntax error

    Mine wasn't a very technical fix - I went to Configuration>New Listing>Mask upcoming products from being included as New products.

    The setting was blank so I just edited it by putting a zero in there and everything righted itself, no idea why or what I did right.

    My knowledge of it all isn't great but what I have learned I learned by changing things one at a time. If it works - great! If it doesn't -change it back quick!

    Good luck.

  9. #9
    Join Date
    Sep 2006
    Posts
    142
    Plugin Contributions
    0

    Default Re: MySQL syntax error

    Well, I installed to the new zen cart 1.3.7

    Everything went great, I got it all set up like I needed, database was testing fine.

    so, I decided to do a final update to the database so I could make the site live, and when I did that, then in the admin I got an error saying the database needed to be patched. So I did the ZC_Install again, because that was what was recommended on another thread. When I did that, it fixed the problem with the Database patch. But then I had to go in and reset the admin to my template, and test it all out again.

    When I went to test it out, I click on the NEW PRODUCTS TAB, and I'm again getting that same error I had in my last store:
    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 ':1' at line 10
    in:
    [SELECT p.products_id, p.products_type, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status FROM products p LEFT JOIN manufacturers m ON (p.manufacturers_id = m.manufacturers_id), products_description pd WHERE p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 order by p.products_date_added DESC, pd.products_name limit 0, 4:1]
    I again tried (3rd time!) to redo the ZC_install on the cart, and again get the same error on the New Products link.

    Can someone please advise!

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

    Default Re: MySQL syntax error

    Check the Configuration ... Maximum Values ... and check the settings on the Configuration ... New Listing ...
    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: v1.5.5]
    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!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v138a 1064 Error in SQL Syntax - old v.1.3.8 on new MySQL
    By Chasel in forum Installing on a Windows Server
    Replies: 3
    Last Post: 18 Aug 2012, 07:36 PM
  2. MySQL Syntax error stopped my sending
    By josee225 in forum General Questions
    Replies: 1
    Last Post: 24 May 2009, 04:22 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. Mysql syntax error
    By NeoBlack in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 6 Dec 2006, 04:30 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR