Catching up changes in reports

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Chris Cormack 2007-10-29 13:22:58 -05:00 committed by Joshua Ferraro
parent 14a8fcba8a
commit 131ca67f2d
3 changed files with 9 additions and 4 deletions

View File

@ -24,7 +24,6 @@ use strict;
use Digest::MD5 qw(md5_base64);
use CGI::Session;
require Exporter;
use C4::Context;
use C4::Output; # to get the template

View File

@ -447,8 +447,12 @@ sub format_results {
$row->{'row'} = $htmlrow;
}
$sth->finish;
return $perl;
$query = "SELECT * FROM saved_sql WHERE id = ?";
$sth = $dbh->prepare($query);
$sth->execute($id);
$data = $sth->fetchrow_hashref();
$sth->finish();
return ($perl,$data->{'report_name'},$data->{'notes'});
}
sub delete_report {

View File

@ -98,11 +98,13 @@ elsif ( $phase eq 'Show SQL'){
elsif ($phase eq 'retrieve results') {
my $id = $input->param('id');
my $results = format_results($id);
my ($results,$name,$notes) = format_results($id);
# do something
$template->param(
'retresults' => 1,
'results' => $results,
'name' => $name,
'notes' => $notes,
);
}