Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2006
    Posts
    100
    Plugin Contributions
    0

    Default SQL error 1064??

    HELP! Something has happened to my site. I haven't installed anything recently, I was just changing around and turning off some of the "new product" boxes when I clicked to refresh and this is what I got..

    Warning: Division by zero in /home/heyprett/public_html/shop/includes/classes/split_page_results.php on line 76
    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 '-0, 0' at line 7
    in:
    [select p.products_image, pd.products_name, p.products_quantity, p.products_id, p.products_type, p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status =1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p2c.products_id = s.products_id where p.products_status = 1 and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '2' order by p.products_sort_order, pd.products_name limit -0, 0]
    I searched all over and couldn't find anything..

    I just did a fresh install and everything has been working great. When I click on server info it says:

    Zen Cart 1.3.7
    Database Patch Level: 1.3.8

  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: SQL error 1064??

    Quote Originally Posted by paperzombie View Post
    I just did a fresh install and everything has been working great. When I click on server info it says:

    Zen Cart 1.3.7
    Database Patch Level: 1.3.8
    Um ... your first problem is that your site files are for v1.3.7 and your database is at 1.3.8.
    That's a dangerous position to be in.
    You should finish the upgrade of your PHP files first.
    It's possible that your other error may go away automatically after that.
    .

    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
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: SQL error 1064??

    In the meantime, check what you've got set in Admin->Configuration->Maximum Values->Products Listing- Number Per Page. You shouldn't set that to zero!!! (nor leave it blank). Put a number in it. The default is 10.
    .

    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.

 

 

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. SQL Error 1064?
    By niemie in forum General Questions
    Replies: 7
    Last Post: 2 Apr 2009, 09:35 PM
  4. SQL Error 1064??
    By sethererm in forum General Questions
    Replies: 15
    Last Post: 25 Jul 2008, 04:40 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