Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2006
    Posts
    154
    Plugin Contributions
    0

    Default 1064 Error after upgrading

    Please let me know what I need to do:

    I upgraded from 1.3.9d to 1.3.9h, and am getting this 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 c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_' at line 1
    in:
    [select count(select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, c.customers_group_pricing, a.entry_country_id, a.entry_company, ci.customers_info_date_of_last_logon, ci.customers_info_date_account_created , c.customers_telephone, a.entry_company, a.entry_street_address, a.entry_city, a.entry_postcode, c.customers_authorization, c.customers_referral, cgc.amount from zen_customers c left join zen_customers_info ci on c.customers_id= ci.customers_info_id left join zen_address_book a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id left join zen_coupon_gv_customer cgc on c.customers_id = cgc.customer_id order by ci.customers_info_date_account_created DESC) as 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.

    :

    Database Host: localhost (127.0.0.1)Server OS: Linux 2.6.18-194.17.4.el5 Database: MySQL 5.0.92-communityServer Date: 05/03/2011 20:01:34 Database Date: 05/03/2011 20:01:34 Server Up Time: 20:01:34 up 175 days, 11:03, 0 users, load average: 1.35, 1.09, 0.95HTTP Server: ApachePHP Version: 5.2.11 (Zend: 2.2.0) PHP Memory Limit: 32MPHP Safe Mode: OffPHP File Uploads: On Max Size: 2MPOST Max Size: 8MDatabase Data Size: 2,309 kBDatabase Index Size: 494 kB
    Zen Cart 1.3.9h

    Database Patch Level: 1.3.9c

    v1.3.9c [2010-07-02 20:16:54] (Version Update 1.3.8->1.3.9c)
    v1.3.9c [2010-06-08 09:45:56] (Version Update 1.3.8->1.3.9c)
    v1.3.8 [2009-02-02 00:28:54] (Version Update 1.3.7->1.3.8)
    v1.3.7 [2009-02-02 00:26:57] (Version Update 1.3.6->1.3.7)
    v1.3.6 [2009-02-02 00:26:42] (Version Update 1.3.5->1.3.6)
    v1.3.5 [2009-02-02 00:26:23] (Version Update 1.3.0.2->1.3.5)
    v1.3.0.2 [2009-02-02 00:25:33] (Version Update 1.3.0.1->1.3.0.2)
    v1.3.0.1 [2009-02-02 00:16:44] (Version Update 1.3.0->1.3.0.1)
    v1.3.0 [2009-02-02 00:15:37] (Version Update 1.2.7->1.3.0)
    v1.2.7 [2006-03-08 13:06:10] (Fresh Installation)

  2. #2
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: 1064 Error after upgrading

    Do you have the following module installed Newsletter Subscribe
    Mark
    Hare Do

  3. #3
    Join Date
    Sep 2006
    Posts
    154
    Plugin Contributions
    0

    Default Re: 1064 Error after upgrading

    Looks like there is a newsletter and product notification link under Tools in her storeadmin, which I clicked on and 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 newsletters_id, title, length(content) as content_length, length(content_' at line 1
    in:
    [select count(select newsletters_id, title, length(content) as content_length, length(content_html) as content_html_length, module, date_added, date_sent, status from zen_newsletters order by date_added desc) as 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.

    So does that need upgraded?

  4. #4
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: 1064 Error after upgrading

    Give this thread an evil eye.. Should fix you right up..
    Mark
    Hare Do

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

    Default Re: 1064 Error after upgrading

    Ok, my evil eye is almost closed after the long day I have had today. But I dont have all that the other person had. So, I deleted the only one that was similar, and it left me with :

    1emailAll CustomersReturns all customers name and email address for sending mass emails (ie: for newsletters, coupons, GV's, messages, etc).select customers_email_address, customers_firstname, customers_lastname from TABLE_CUSTOMERS order by customers_lastname, customers_firstname, customers_email_address[3email,newslettersDormant Customers (>3months) (Subscribers)Subscribers who HAVE purchased something, but have NOT purchased for at least three months.select o.date_purchased, c.customers_email_address, c.customers_lastname, c.customers_firstname from TABLE_CUSTOMERS c, TABLE_ORDERS o WHERE c.customers_id = o.customers_id AND c.customers_newsletter = 1 GROUP BY c.customers_email_address HAVING max(o.date_purchased) <= subdate(now(),INTERVAL 3 MONTH) ORDER BY c.customers_lastname, c.customers_firstname ASC4email,newslettersActive customers in past 3 months (Subscribers)Newsletter subscribers who are also active customers (purchased something) in last 3 months.select c.customers_email_address, c.customers_lastname, c.customers_firstname from TABLE_CUSTOMERS c, TABLE_ORDERS o where c.customers_newsletter = '1' AND c.customers_id = o.customers_id and o.date_purchased > subdate(now(),INTERVAL 3 MONTH) GROUP BY c.customers_email_address order by c.customers_lastname, c.customers_firstname ASC5email,newslettersActive customers in past 3 months (Regardless of subscription status)All active customers (purchased something) in last 3 months, ignoring newsletter-subscription status.select c.customers_email_address, c.customers_lastname, c.customers_firstname from TABLE_CUSTOMERS c, TABLE_ORDERS o WHERE c.customers_id = o.customers_id and o.date_purchased > subdate(now(),INTERVAL 3 MONTH) GROUP BY c.customers_email_address order by c.customers_lastname, c.customers_firstname ASC8email,newslettersAdministratorJust the email account of the current administratorselect 'ADMIN' as customers_firstname, admin_name as customers_lastname, admin_email as customers_email_address from TABLE_ADMIN where admin_id = $SESSION:admin_id9email,newslettersCustomers who have never completed a purchaseFor sending newsletter to all customers who registered but have never completed a purchaseSELECT DISTINCT c.customers_email_address as customers_email_address, c.customers_lastname as customers_lastname, c.customers_firstname as customers_firstname FROM TABLE_CUSTOMERS c LEFT JOIN TABLE_ORDERS o ON c.customers_id=o.customers_id WHERE o.date_purchased IS NULL1emailAll CustomersReturns all customers name and email address for sending mass emails (ie: for newsletters, coupons, GV's, messages, etc).select customers_email_address, customers_firstname, customers_lastname from TABLE_CUSTOMERS order by customers_lastname, customers_firstname, customers_email_address3email,newslettersDormant Customers (>3months) (Subscribers)Subscribers who HAVE purchased something, but have NOT purchased for at least three months.select o.date_purchased, c.customers_email_address, c.customers_lastname, c.customers_firstname from TABLE_CUSTOMERS c, TABLE_ORDERS o WHERE c.customers_id = o.customers_id AND c.customers_newsletter = 1 GROUP BY c.customers_email_address HAVING max(o.date_purchased) <= subdate(now(),INTERVAL 3 MONTH) ORDER BY c.customers_lastname, c.customers_firstname ASC4email,newslettersActive customers in past 3 months (Subscribers)Newsletter subscribers who are also active customers (purchased something) in last 3 months.select c.customers_email_address, c.customers_lastname, c.customers_firstname from TABLE_CUSTOMERS c, TABLE_ORDERS o where c.customers_newsletter = '1' AND c.customers_id = o.customers_id and o.date_purchased > subdate(now(),INTERVAL 3 MONTH) GROUP BY c.customers_email_address order by c.customers_lastname, c.customers_firstname ASC[5email,newslettersActive customers in past 3 months (Regardless of subscription status)All active customers (purchased something) in last 3 months, ignoring newsletter-subscription status.select c.customers_email_address, c.customers_lastname, c.customers_firstname from TABLE_CUSTOMERS c, TABLE_ORDERS o WHERE c.customers_id = o.customers_id and o.date_purchased > subdate(now(),INTERVAL 3 MONTH) GROUP BY c.customers_email_address order by c.customers_lastname, c.customers_firstname ASC8email,newslettersAdministratorJust the email account of the current administratorselect 'ADMIN' as customers_firstname, admin_name as customers_lastname, admin_email as customers_email_address from TABLE_ADMIN where admin_id = $SESSION:admin_id[9email,newslettersCustomers who have never completed a purchaseFor sending newsletter to all customers who registered but have never completed a purchaseSELECT DISTINCT c.customers_email_address as customers_email_address, c.customers_lastname as customers_lastname, c.customers_firstname as customers_firstname FROM TABLE_CUSTOMERS c LEFT JOIN TABLE_ORDERS o ON c.customers_id=o.customers_id WHERE o.date_purchased IS NULL


    1

    email

    All Customers
    Returns all customers name and email address for sending mass emails (ie: for newsletters, coupons, GV's, messages, etc).
    select customers_email_address, customers_firstname, customers_lastname from TABLE_CUSTOMERS order by customers_lastname, customers_firstname, customers_email_address






    3

    email,newsletters

    Dormant Customers (>3months) (Subscribers)
    Subscribers who HAVE purchased something, but have NOT purchased for at least three months.
    select o.date_purchased, c.customers_email_address, c.customers_lastname, c.customers_firstname from TABLE_CUSTOMERS c, TABLE_ORDERS o WHERE c.customers_id = o.customers_id AND c.customers_newsletter = 1 GROUP BY c.customers_email_address HAVING max(o.date_purchased) <= subdate(now(),INTERVAL 3 MONTH) ORDER BY c.customers_lastname, c.customers_firstname ASC






    4

    email,newsletters

    Active customers in past 3 months (Subscribers)
    Newsletter subscribers who are also active customers (purchased something) in last 3 months.
    select c.customers_email_address, c.customers_lastname, c.customers_firstname from TABLE_CUSTOMERS c, TABLE_ORDERS o where c.customers_newsletter = '1' AND c.customers_id = o.customers_id and o.date_purchased > subdate(now(),INTERVAL 3 MONTH) GROUP BY c.customers_email_address order by c.customers_lastname, c.customers_firstname ASC






    5

    email,newsletters

    Active customers in past 3 months (Regardless of subscription status)
    All active customers (purchased something) in last 3 months, ignoring newsletter-subscription status.
    select c.customers_email_address, c.customers_lastname, c.customers_firstname from TABLE_CUSTOMERS c, TABLE_ORDERS o WHERE c.customers_id = o.customers_id and o.date_purchased > subdate(now(),INTERVAL 3 MONTH) GROUP BY c.customers_email_address order by c.customers_lastname, c.customers_firstname ASC






    8

    email,newsletters

    Administrator
    Just the email account of the current administrator
    select 'ADMIN' as customers_firstname, admin_name as customers_lastname, admin_email as customers_email_address from TABLE_ADMIN where admin_id = $SESSION:admin_id






    9

    email,newsletters

    Customers who have never completed a purchase
    For sending newsletter to all customers who registered but have never completed a purchase
    SELECT DISTINCT c.customers_email_address as customers_email_address, c.customers_lastname as customers_lastname, c.customers_firstname as customers_firstname FROM TABLE_CUSTOMERS c LEFT JOIN TABLE_ORDERS o ON c.customers_id=o.customers_id WHERE o.date_purchased IS NULL

  6. #6
    Join Date
    Sep 2006
    Posts
    154
    Plugin Contributions
    0

    Default Re: 1064 Error after upgrading

    Sorry, I pasted more than once!

  7. #7
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 1064 Error after upgrading

    The query_builder data you posted looks fine.

    The symptoms you're reporting suggest that something's wrong with the split_page_results code, since you're generating weird queries saying "select count(select ..." where "select" is used inside the count() function, which is an invalid syntax.

    Maybe you've got some addon that's changed the core behavior of that class, or the file was damaged in your merge or download/upload process. Or maybe that's just a symptom of a deeper problem.

    This is where I usually start with those kind of odd symptoms: http://www.zen-cart.com/wiki/index.p...Obscure_Issues
    .

    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.

  8. #8
    Join Date
    Sep 2006
    Posts
    154
    Plugin Contributions
    0

    Default Re: 1064 Error after upgrading

    Thank you, I deleted and reloaded and it is now functioning. I appreciate the quick response! :)

 

 

Similar Threads

  1. 1064 SQL Syntax error when upgrading database from 1.3.8 to 1.3.9
    By pioupioun in forum Upgrading from 1.3.x to 1.3.9
    Replies: 5
    Last Post: 23 Aug 2010, 06:26 AM
  2. Replies: 3
    Last Post: 21 Sep 2008, 12:45 AM
  3. error 1064 after client completed order.
    By cristaltech in forum Managing Customers and Orders
    Replies: 8
    Last Post: 15 May 2007, 04:21 PM
  4. 1064 sql error after confirming order
    By rued in forum General Questions
    Replies: 20
    Last Post: 31 Aug 2006, 04:07 AM

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