Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Aug 2009
    Posts
    26
    Plugin Contributions
    0

    Default Error 1064 when searching customers orders

    Hi all,
    my first post... using 1.3.8, I use stock by attributes and a sidebox addon. I recently altered orders.php because I couldn't search for a product id in all orders, that's been fixed, but now when I look for a customers orders I get:


    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 o.orders_id, o.customers_id, o.customers_name, o.payment_method, o.shippi' at line 1
    in:
    [select count(*) as total select o.orders_id, o.customers_id, o.customers_name, o.payment_method, o.shipping_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total, o.customers_company, o.customers_email_address, o.customers_street_address, o.delivery_company, o.delivery_name, o.delivery_street_address, o.billing_company, o.billing_name, o.billing_street_address, o.payment_module_code, o.shipping_module_code, o.ip_address from (zen_orders_status s, zen_orders o ) left join zen_orders_total ot on (o.orders_id = ot.orders_id) where o.customers_id = '8' and o.orders_status = s.orders_status_id and s.language_id = '1' and ot.class = 'ot_total']
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

    did a search but havnen't found nothing in the forums. how would I go about searching for the file that could have the error?

    thanks, Edvon

  2. #2
    Join Date
    Aug 2009
    Posts
    26
    Plugin Contributions
    0

    Default Re: Error 1064 when searching customers orders

    here is the changes I made to the orders.php file:

    before:
    $new_fields . "
    from (" . TABLE_ORDERS_STATUS . " s, " .
    TABLE_ORDERS . " o " .

    after:

    $new_fields . "
    from (" . TABLE_ORDERS . " o, " .
    TABLE_ORDERS_STATUS . " s " .


    before:
    $new_fields . "
    from (" . TABLE_ORDERS_STATUS . " s, " .
    TABLE_ORDERS . " o " .

    after:
    $new_fields . "
    from (" . TABLE_ORDERS . " o, " .
    TABLE_ORDERS_STATUS . " s " .



    before:
    $new_fields . "
    from (" . TABLE_ORDERS_STATUS . " s, " .
    TABLE_ORDERS . " o " .


    after:

    $new_fields . "
    from (" . TABLE_ORDERS . " o, " .
    TABLE_ORDERS_STATUS . " s " .



    Hope this might help to fix?

    Edvon

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

    Default Re: Error 1064 when searching customers orders

    Better would be to upgrade to the latest version where all known bugs are fixed.
    .
    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.

  4. #4
    Join Date
    Aug 2009
    Posts
    26
    Plugin Contributions
    0

    Default Re: Error 1064 when searching customers orders

    Thanks Dr. Byte,

    yes, about upgrading I am a little apprehensive, but I suppose it makes sense. Any pointers to threads about upgrading and what to look out for when doing so? Will all my mods (stock by attributes, sideboxes) be "remembered" after the upgrade?

    Edvon

 

 

Similar Threads

  1. v150 Out of memory error when searching
    By MelodyW in forum General Questions
    Replies: 1
    Last Post: 3 Apr 2015, 11:29 AM
  2. Replies: 7
    Last Post: 2 Sep 2010, 11:30 PM
  3. Error when searching for swedish characters (å, ä, ö)
    By ErikAllan in forum General Questions
    Replies: 4
    Last Post: 15 Feb 2009, 06:03 PM
  4. 1064 ERROR when trying to edit customers account
    By Robbyn7 in forum Customization from the Admin
    Replies: 7
    Last Post: 19 Jun 2007, 03:17 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