diff --git a/admin/reports.inc.php b/admin/reports.inc.php
index 49305434..b26c46ae 100644
--- a/admin/reports.inc.php
+++ b/admin/reports.inc.php
@@ -575,10 +575,21 @@ foreach($report_stock as $n=>$v) {
$q = call_user_func_array($func, array($report, $components));
$q = "SELECT $sel $q $filter_query $group_query ORDER BY $order";
-
-// print("$q");
-
$r = mysql_query($q);
+
+ if($r == false) {
+ echo "The report database query has failed. This is
+ unfortunate but not your fault. Please send the following to
+ your fair administrator, or visit http://www.sfiab.ca and submit
+ a bug report so we can get this fixed.
";
+ echo "
"; + echo "Query: [$q]"; + exit; + } + echo mysql_error(); $ncols = count($report['col']);
"; + echo "Error: [".mysql_error()."]
"; + echo "