forked from science-ation/science-ation
- Do something more intelligent when the report query fails, like, print a
friendly message with the failed query.
This commit is contained in:
parent
4cacf1b945
commit
c44803e365
@ -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 <a
|
||||
href=\"http://www.sfiab.ca\">http://www.sfiab.ca</a> and submit
|
||||
a bug report so we can get this fixed.<br />";
|
||||
echo "<pre>";
|
||||
echo "Query: [$q]<br />";
|
||||
echo "Error: [".mysql_error()."]<br />";
|
||||
echo "</pre>";
|
||||
exit;
|
||||
}
|
||||
|
||||
echo mysql_error();
|
||||
|
||||
$ncols = count($report['col']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user