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); }
}
?>