Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2007
    Location
    Manchester, England
    Posts
    168
    Plugin Contributions
    0

    Default Query Builder Hanging

    Hey Guys,

    Odd problem I'm having here.

    No doubt about it I'll find the solution instantly after posting a new thread. Worth a try anyway.

    Ok, I've upgraded a 1.3.7 to a 1.3.8. This site has about 18,000 customers with about 13,000 orders. It's pushing ZC to the absolute limit!

    Everything is going swimmingly. No issues with the upgrade except for one thing - the Query Builder stuff (when you want to email customers).

    Firstly, when I clicked on 'email customer' from customers.php, I got an error about TABLE_CUSTOMERS not being found. Rather odd, so I removed the constant to 'customers' for the time being to remedy it temporarily.

    Now though, the page is hanging. I've worked out it's on line 312 of admin/mail.php which is:

    PHP Code:
    $customers get_audiences_list('email'); 
    I quote that out and the page loads without any text.

    After going into the query builder table (and removing various tags from the query_name field), I've found out that removing 'email,newsletters' from 'administrator' and 'customers who have never completed a purchase' gives me the following 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 'WHERE customers_email_format != 'NONE' order by customers_lastname, customers_fi' at line 1
    in:
    [select customers_email_address, customers_firstname, customers_lastname from customers WHERE customers_email_format != 'NONE' order by customers_lastname, customers_firstname, customers_email_address]
    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.
    Not sure if that's related to this, but it seems to be.

    I have the following modules installed:

    Amazon Populator
    Google XML Sitemap
    YSM Analytics Module
    Cross Seller
    Add Customer
    Advanced Stats
    Quantity Time Report
    Search Log
    Monthly Sales
    Sales Report
    Export Email Addresses
    Orders Export

    YSM Addon
    Product Listing
    Numinix Lightbox
    Search Helper

    Protx Form


    NO IDEA whats happening here, but I have a feeling it's something to do with the upgrade.

    Please help!!!!!

    Thanks
    Tom

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

    Default Re: Query Builder Hanging

    .

    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
    Sep 2007
    Location
    Manchester, England
    Posts
    168
    Plugin Contributions
    0

    Default Re: Query Builder Hanging

    Thanks for the help Bytey.

    That query worked fine, in the sense that it stopped the script from hanging, but now I'm just getting a blank page showing up.

    I have a feeling i've quoted something out along the way and forgotten to unquote it.

    However, the page loads with the header intact, but the navigation stops after 'Tools'.

    Thanks

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Query Builder Hanging

    "Bytey"? That's a new one.

    FAQ on dealing with blank pages: https://www.zen-cart.com/tutorials/index.php?article=82 ... try the debug logging utility mentioned there.
    .

    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.

  5. #5
    Join Date
    Sep 2007
    Location
    Manchester, England
    Posts
    168
    Plugin Contributions
    0

    Default Re: Query Builder Hanging

    Quote Originally Posted by DrByte View Post
    "Bytey"? That's a new one.

    FAQ on dealing with blank pages: https://www.zen-cart.com/tutorials/index.php?article=82 ... try the debug logging utility mentioned there.
    Hah, I'm surprised no-ones called you that already!

    Right, it appears to be a memory allocation error:

    [06-Oct-2009 08:35:12] PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 35 bytes) in /site/path/includes/classes/db/mysql/query_factory.php on line 411
    Sorry to keep pestering you about this.

  6. #6
    Join Date
    Sep 2007
    Location
    Manchester, England
    Posts
    168
    Plugin Contributions
    0

    Default Re: Query Builder Hanging

    Never mind, I found a thread

  7. #7
    Join Date
    Sep 2007
    Location
    Manchester, England
    Posts
    168
    Plugin Contributions
    0

    Default Re: Query Builder Hanging

    Just an interesting note actually, I didn't get this memory error on the clients 1.3.7 website, it's only happening after I upgraded it.

    I assume the errors being throw because of the the amount of customers on the site?

 

 

Similar Threads

  1. v154 Help with a SQL Query for Query Builder
    By lindasdd in forum Managing Customers and Orders
    Replies: 2
    Last Post: 24 Mar 2016, 01:18 PM
  2. v151 SQL query setup. How do I TEST a query 'off-line'?
    By lewisasding in forum General Questions
    Replies: 3
    Last Post: 8 Mar 2013, 12:24 AM
  3. v150 Query builder
    By kalastaja in forum General Questions
    Replies: 5
    Last Post: 21 Oct 2012, 06:58 PM
  4. Name Builder...errr... PC Builder?
    By prosam in forum General Questions
    Replies: 3
    Last Post: 1 Oct 2010, 12:23 AM
  5. Query Builder Table syntax? - custom email groups
    By mcarbone in forum General Questions
    Replies: 4
    Last Post: 22 Apr 2010, 10:57 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