[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/admin currency.pl,1.7,1.8
From: |
Mike Hansen |
Subject: |
[Koha-cvs] CVS: koha/admin currency.pl,1.7,1.8 |
Date: |
Wed, 09 Apr 2003 21:05:21 -0700 |
Update of /cvsroot/koha/koha/admin
In directory sc8-pr-cvs1:/tmp/cvs-serv22906/koha/admin
Modified Files:
currency.pl
Log Message:
Fixed bug #299
Index: currency.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/currency.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** currency.pl 5 Apr 2003 03:35:09 -0000 1.7
--- currency.pl 10 Apr 2003 04:05:18 -0000 1.8
***************
*** 114,123 ****
$template->param(add_validate => 1);
my $dbh = C4::Context->dbh;
! my $query = "replace currency (currency,rate) values (";
! $query.= $dbh->quote($input->param('currency')).",";
! $query.= $dbh->quote($input->param('rate')).")";
! my $sth=$dbh->prepare($query);
! $sth->execute;
! $sth->finish;
# END $OP eq ADD_VALIDATE
################## DELETE_CONFIRM ##################################
--- 114,134 ----
$template->param(add_validate => 1);
my $dbh = C4::Context->dbh;
!
! my $check = $dbh->prepare("select * from currency where currency = ?");
! $check->execute($input->param('currency'));
! if ( $check->fetchrow )
! {
! my $sth = $dbh->prepare("UPDATE currency SET rate = ? WHERE
currency = ?");
! $sth->execute($input->param('rate'),$input->param('currency'));
! $sth->finish;
! }
! else
! {
! my $sth = $dbh->prepare("INSERT INTO currency (currency, rate)
VALUES (?,?)");
! $sth->execute($input->param('currency'),$input->param('rate'));
! $sth->finish;
! }
!
! $check->finish;
# END $OP eq ADD_VALIDATE
################## DELETE_CONFIRM ##################################
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/admin currency.pl,1.7,1.8,
Mike Hansen <=