diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm index 310b3e9145..282c0d85b6 100644 --- a/C4/Reports/Guided.pm +++ b/C4/Reports/Guided.pm @@ -593,6 +593,7 @@ sub execute_query { $dbh->do( 'UPDATE saved_sql SET last_run = NOW() WHERE id = ?', undef, $report_id ) if $report_id; + $sql = "-- saved_sql.id=$report_id\n" . $sql; my $sth = $dbh->prepare($sql); eval { $sth->execute(@$sql_params, $offset, $limit);