View | Details | Raw Unified | Return to bug 5004
Collapse All | Expand All

(-)a/admin/roadtype.pl (-9 lines)
Lines 98-115 if ($op eq 'add_form') { Link Here
98
} elsif ($op eq 'delete_confirm') {
98
} elsif ($op eq 'delete_confirm') {
99
	$template->param(delete_confirm => 1);
99
	$template->param(delete_confirm => 1);
100
	my $dbh = C4::Context->dbh;
100
	my $dbh = C4::Context->dbh;
101
	my $sth=$dbh->prepare("select count(*) as total from borrowers,roadtype where borrowers.streettype=roadtype.road_type and roadtypeid=?");
102
	$sth->execute($roadtypeid);
103
	my $total = $sth->fetchrow_hashref;
104
	$sth->finish;
105
	$template->param(total => $total->{'total'});	
106
	my $sth2=$dbh->prepare("select roadtypeid,road_type from roadtype where  roadtypeid=?");
101
	my $sth2=$dbh->prepare("select roadtypeid,road_type from roadtype where  roadtypeid=?");
107
	$sth2->execute($roadtypeid);
102
	$sth2->execute($roadtypeid);
108
	my $data=$sth2->fetchrow_hashref;
103
	my $data=$sth2->fetchrow_hashref;
109
	$sth2->finish;
104
	$sth2->finish;
110
	if ($total->{'total'} >0) {
111
		$template->param(totalgtzero => 1);
112
	}
113
105
114
        $template->param(	
106
        $template->param(	
115
				road_type       =>	( $data->{'road_type'}),
107
				road_type       =>	( $data->{'road_type'}),
116
- 

Return to bug 5004