Hi,
I had the same problem.
The problem is around the customers_state, if u have some states with 1 quote, the sql request sux.
You need to add addslashes function for the variable $customers_location['zone_name'].
In the file order_tracking.php line 1028
Change :
$location_pending_query = tep_db_query("select count(*) as count from " . TABLE_ORDERS . " where customers_state = '". $customers_location['zone_name'] ." ' and date_purchased >= '$year-$startmonth-01 00:00:00' and date_purchased <= '$year-$endmonth-31 11:59:59' ");
With :
$location_pending_query = tep_db_query("select count(*) as count from " . TABLE_ORDERS . " where customers_state = '". addslashes($customers_location['zone_name']) ." ' and date_purchased >= '$year-$startmonth-01 00:00:00' and date_purchased <= '$year-$endmonth-31 11:59:59' ");
Godd luck