Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2010
    Posts
    205
    Plugin Contributions
    0

    Default SQL Error.... can anyone advise me on this?

    Just moved my cart over to a new server... everything seems to be working ok except when I click on the "new products" link I get a sql error:

    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 'SELECT p.products_id, p.products_type, pd.products_name, p.products_image, p.pro' at line 1
    in:
    [select count(*) as total 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, p.master_categories_id FROM zen_products p LEFT JOIN zen_manufacturers m ON (p.manufacturers_id = m.manufacturers_id), zen_products_description pd WHERE p.products_status = 1 AND p.products_id = pd.products_id AND p.master_categories_id != 10 AND pd.language_id = 1 and p.products_date_added >=20100121]

    =============================

    If I click on the show all inventory link everything is there. I went into php admin and checked the database... it doesn't appear to have any issues. I click on the repair database icon just to be sure but no problems. Is it possible a php file didn't copy over properly ? I'm not a programmer but hope some one can help explain it in layman's terms. Thanks for any and all advice.....

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

    Default Re: SQL Error.... can anyone advise me on this?

    The problem is not in your database.
    Something is wrong in your PHP files causing it to send bad queries to the database.
    Did you check for sure whether it was working correctly on the *old* server? If it was, then maybe your PHP files didn't upload properly. But, judging by the query quoted it seems more like something's broken than missing.
    .

    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 2010
    Posts
    205
    Plugin Contributions
    0

    Default Re: SQL Error.... start with your last mod & work backwards.

    Thanks Dr. Byte - since I'm a newbie I decided from the start that (in addition to backing up) every time I was about to change a php file, I would leave a copy of it in the directory with a "bak" extension. It really helped me today...... I started to rename those bak files until the culprit (header_php.php) revealed itself. Anyways, I'm pretty happy how that worked out and just wanted to let other newbies know how I was able to resolve the problem. Of course, you might be asking why the heck a non-programmer is messing around with php files and my answer would be 'because they're there' haha.

 

 

Similar Threads

  1. Can anyone help with this error?
    By joyjoy in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 27 Feb 2011, 05:34 AM
  2. Replies: 3
    Last Post: 26 Mar 2010, 10:13 AM
  3. Payment modules error - can someone advise?
    By paulf in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 22 Nov 2008, 08:51 PM
  4. Can anyone tell me why this shows up this way?
    By humbll in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 5 Feb 2007, 03:11 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