chiark / gitweb /
Make query dumping conditional on debug
[ypp-sc-tools.db-live.git] / yarrg / web / routetrade
index 9a7b036cdde9b468233f5a770a2dafec1d59420e..e154f2c6c2c683d434ae182fd33b390051f6aa87 100644 (file)
@@ -2,6 +2,7 @@
 $dbh
 @islandids
 @archipelagoes
+$qa
 </%args>
 <%perl>
 
@@ -69,10 +70,12 @@ my $sth= $dbh->prepare($stmt);
 $sth->execute(@query_params);
 
 </%perl>
+% if ($qa->{'debug'}) {
 <pre>
 <% $stmt |h %>
 <% join(' | ',@query_params) |h %>
 </pre>
+% }
 
 <& dumpqueryresults, sth =>$sth &>