Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15
  1. #11
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Database queries took down host. Please help

    I'm not sure that I believe them, at least about the includes/modules/sideboxes/order_history.php file. They may have just searched on the first part of the query, which would return that, not the bits that might be causing the problem.

    The includes/modules/sideboxes/ezppt/recent_orders.php is a more likely candidate. It's not part of Zen Cart or any mods that I've used. Have you opened it up to see if it contains the errant query? Have you tried removing the file and seeing if that cures the problem?
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  2. #12
    Join Date
    Jun 2009
    Posts
    187
    Plugin Contributions
    0

    Default Re: Database queries took down host. Please help

    Yes, that query is in there... I will rename that file.. I'll look at the other file now.

    <?php
    $show_recent_orders_sidebox = true;
    define('MAX_DISPLAY_RECENTORDERS','20');
    define('MIN_DISPLAY_RECENTORDERS','1');
    define('BOX_HEADING_RECENTORDERS','Recently Sold items');
    define('BOX_HEADING_TRUNCATE','30');
    define('BOX_HEADING_TRUNCATE_MORE','...');

    /*$recent_orders_query = "select distinct op.products_id,op.products_name , o.delivery_city , o.delivery_country
    from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op ,". TABLE_PAYPAL ." p
    where o.orders_id = p.order_id
    and o.orders_id = op.orders_id
    order by o.orders_id desc
    limit " . MAX_DISPLAY_RECENTORDERS;*/
    $recent_orders_query = "select distinct op.products_id,op.products_name , o.delivery_city , o.delivery_country
    from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op ,". TABLE_PAYPAL ." p
    where o.orders_id = op.orders_id
    order by o.orders_id desc
    limit " . MAX_DISPLAY_RECENTORDERS;
    $recent_orders = $db->Execute($recent_orders_query);
    if ($recent_orders->RecordCount() >= MIN_DISPLAY_RECENTORDERS) {
    $title = BOX_HEADING_RECENTORDERS;
    $box_id = 'recentorders';
    $rows = 0;
    while (!$recent_orders->EOF) {
    $rows++;
    $recentorders_list[$rows]['id'] = $recent_orders->fields['products_id'];
    $recentorders_list[$rows]['name'] = $recent_orders->fields['products_name'];
    $recentorders_list[$rows]['city'] = $recent_orders->fields['delivery_city'];
    $recentorders_list[$rows]['country'] = $recent_orders->fields['delivery_country'];

    $recent_orders->MoveNext();
    }
    require($template->get_template_dir('tpl_recent_orders.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_recent_orders.php');
    $title = 'Recently Sold items';
    $title_link = false;
    if( $column_box_default==''){
    require($down_column_box_default);
    }else{
    require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default); }
    }
    ?>

  3. #13
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Database queries took down host. Please help

    You didn't respond to Kuroi's request to identify the mods you disabled. Posting their names and something about the source could really help other people avoid the problems you have had.

  4. #14
    Join Date
    Jun 2009
    Posts
    187
    Plugin Contributions
    0

    Default Re: Database queries took down host. Please help

    We disabled all mods in the sideboxes controller. But for some reason these mods were still running which leads me to believe they are hard coded. So disabling the mods did nothing to help - So if I told you which ones we disabled it wouldn't give any insight. This is a foreign installation (China) and is not like the standard zen cart I am used to dealing with. I will provide full details once I resolve it.

    Thanks

  5. #15
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Database queries took down host. Please help

    OK, good luck getting the problems cleared out.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v154 How to keep database queries down and store optimized.
    By sports guy in forum General Questions
    Replies: 2
    Last Post: 15 Apr 2015, 05:45 AM
  2. v139h Took over site, moving to another host, missing information to make this go smooth
    By Jeremiah H in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 10 Sep 2012, 08:08 PM
  3. v150 memeory problems took down my server - is it seo_cache?
    By milobloom in forum General Questions
    Replies: 2
    Last Post: 7 Sep 2012, 11:12 PM
  4. Doing a backup took over 7 hours - please help - [SSU]
    By nisdats in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 23 Jan 2010, 08:13 AM
  5. Replies: 5
    Last Post: 6 Sep 2006, 03:41 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