[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/admin categoryitem.pl,1.7,1.7.2.1
From: |
MJ Ray |
Subject: |
[Koha-cvs] CVS: koha/admin categoryitem.pl,1.7,1.7.2.1 |
Date: |
Thu, 08 Jan 2004 08:28:23 -0800 |
Update of /cvsroot/koha/koha/admin
In directory sc8-pr-cvs1:/tmp/cvs-serv3491/admin
Modified Files:
Tag: rel_2_0
categoryitem.pl
Log Message:
DBI call fix for bug 662
Index: categoryitem.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/categoryitem.pl,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -C2 -r1.7 -r1.7.2.1
*** categoryitem.pl 5 Apr 2003 03:35:09 -0000 1.7
--- categoryitem.pl 8 Jan 2004 16:28:20 -0000 1.7.2.1
***************
*** 53,68 ****
my @data=split(' ',$searchstring);
my address@hidden;
! my $query="Select * from categories where (description like
\"$data[0]%\")";
! my $sth=$dbh->prepare($query);
! $sth->execute;
my @results;
- my $cnt=0;
while (my $data=$sth->fetchrow_hashref){
push(@results,$data);
- $cnt ++;
}
# $sth->execute;
$sth->finish;
! return ($cnt,address@hidden);
}
--- 53,65 ----
my @data=split(' ',$searchstring);
my address@hidden;
! my $sth=$dbh->prepare("Select * from categories where (description like
?)");
! $sth->execute("$data[0]%");
my @results;
while (my $data=$sth->fetchrow_hashref){
push(@results,$data);
}
# $sth->execute;
$sth->finish;
! return (scalar(@results),address@hidden);
}
***************
*** 96,101 ****
if ($categorycode) {
my $dbh = C4::Context->dbh;
! my $sth=$dbh->prepare("select
categorycode,description,enrolmentperiod,upperagelimit,dateofbirthrequired,finetype,bulk,enrolmentfee,issuelimit,reservefee,overduenoticerequired
from categories where categorycode='$categorycode'");
! $sth->execute;
$data=$sth->fetchrow_hashref;
$sth->finish;
--- 93,98 ----
if ($categorycode) {
my $dbh = C4::Context->dbh;
! my $sth=$dbh->prepare("select
categorycode,description,enrolmentperiod,upperagelimit,dateofbirthrequired,finetype,bulk,enrolmentfee,issuelimit,reservefee,overduenoticerequired
from categories where categorycode=?");
! $sth->execute($categorycode);
$data=$sth->fetchrow_hashref;
$sth->finish;
***************
*** 121,138 ****
$template->param(add_validate => 1);
my $dbh = C4::Context->dbh;
! my $query = "replace categories
(categorycode,description,enrolmentperiod,upperagelimit,dateofbirthrequired,finetype,bulk,enrolmentfee,issuelimit,reservefee,overduenoticerequired)
values (";
! $query.= $dbh->quote($input->param('categorycode')).",";
! $query.= $dbh->quote($input->param('description')).",";
! $query.= $dbh->quote($input->param('enrolmentperiod')).",";
! $query.= $dbh->quote($input->param('upperagelimit')).",";
! $query.= $dbh->quote($input->param('dateofbirthrequired')).",";
! $query.= $dbh->quote($input->param('finetype')).",";
! $query.= $dbh->quote($input->param('bulk')).",";
! $query.= $dbh->quote($input->param('enrolmentfee')).",";
! $query.= $dbh->quote($input->param('issuelimit')).",";
! $query.= $dbh->quote($input->param('reservefee')).",";
! $query.= $dbh->quote($input->param('overduenoticerequired')).")";
! my $sth=$dbh->prepare($query);
! $sth->execute;
$sth->finish;
print "data recorded";
--- 118,123 ----
$template->param(add_validate => 1);
my $dbh = C4::Context->dbh;
! my $sth=$dbh->prepare("replace categories
(categorycode,description,enrolmentperiod,upperagelimit,dateofbirthrequired,finetype,bulk,enrolmentfee,issuelimit,reservefee,overduenoticerequired)
values (?,?,?,?,?,?,?,?,?,?,?)");
! $sth->execute(map {$input->param($_)}
('categorycode','description','enrolmentperiod','upperagelimit','dateofbirthrequired','finetype','bulk','enrolmentfee','issuelimit','reservefee','overduenoticerequired'));
$sth->finish;
print "data recorded";
***************
*** 146,156 ****
$template->param(delete_confirm => 1);
my $dbh = C4::Context->dbh;
! my $sth=$dbh->prepare("select count(*) as total from categoryitem where
categorycode='$categorycode'");
! $sth->execute;
my $total = $sth->fetchrow_hashref;
print "TOTAL : $categorycode : $total->{'total'}<br>";
$sth->finish;
! my $sth2=$dbh->prepare("select
categorycode,description,enrolmentperiod,upperagelimit,dateofbirthrequired,finetype,bulk,enrolmentfee,issuelimit,reservefee,overduenoticerequired
from categories where categorycode='$categorycode'");
! $sth2->execute;
my $data=$sth2->fetchrow_hashref;
$sth2->finish;
--- 131,141 ----
$template->param(delete_confirm => 1);
my $dbh = C4::Context->dbh;
! my $sth=$dbh->prepare("select count(*) as total from categoryitem where
categorycode=?");
! $sth->execute($categorycode);
my $total = $sth->fetchrow_hashref;
print "TOTAL : $categorycode : $total->{'total'}<br>";
$sth->finish;
! my $sth2=$dbh->prepare("select
categorycode,description,enrolmentperiod,upperagelimit,dateofbirthrequired,finetype,bulk,enrolmentfee,issuelimit,reservefee,overduenoticerequired
from categories where categorycode=?");
! $sth2->execute($categorycode);
my $data=$sth2->fetchrow_hashref;
$sth2->finish;
***************
*** 174,180 ****
my $dbh = C4::Context->dbh;
my $categorycode=uc($input->param('categorycode'));
! my $query = "delete from categories where categorycode='$categorycode'";
! my $sth=$dbh->prepare($query);
! $sth->execute;
$sth->finish;
# END $OP eq DELETE_CONFIRMED
--- 159,164 ----
my $dbh = C4::Context->dbh;
my $categorycode=uc($input->param('categorycode'));
! my $sth=$dbh->prepare("delete from categories where categorycode=?");
! $sth->execute($categorycode);
$sth->finish;
# END $OP eq DELETE_CONFIRMED
***************
*** 197,201 ****
issuelimit => $results->[$i]{'issuelimit'},
reservefee => $results->[$i]{'reservefee'},
! toggle = $toggle );
push @loop, \%row;
if ( $toggle eq 'white' )
--- 181,185 ----
issuelimit => $results->[$i]{'issuelimit'},
reservefee => $results->[$i]{'reservefee'},
! toggle => $toggle );
push @loop, \%row;
if ( $toggle eq 'white' )
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/admin categoryitem.pl,1.7,1.7.2.1,
MJ Ray <=
- Prev by Date:
[Koha-cvs] CVS: koha/koha-tmpl/opac-tmpl/css/fr kohaerror.tmpl,NONE,1.1.2.1 opac-account.tmpl,NONE,1.1.2.1 opac-auth.tmpl,NONE,1.1.2.1 opac-detail.tmpl,NONE,1.1.2.1 opac-main.tmpl,NONE,1.1.2.1 opac-moredetail.tmpl,NONE,1.1.2.1 opac-reserve.tmpl,NONE,1.1.2.1 opac-searchresults.tmpl,NONE,1.1.2.1 opac-search.tmpl,NONE,1.1.2.1 opac-user.tmpl,NONE,1.1.2.1 opac-userupdate.tmpl,NONE,1.1.2.1 subject.tmpl,NONE,1.1.2.1
- Next by Date:
[Koha-cvs] CVS: koha/maint shiftbib.pl,1.3,1.3.2.1
- Previous by thread:
[Koha-cvs] CVS: koha/koha-tmpl/opac-tmpl/css/fr kohaerror.tmpl,NONE,1.1.2.1 opac-account.tmpl,NONE,1.1.2.1 opac-auth.tmpl,NONE,1.1.2.1 opac-detail.tmpl,NONE,1.1.2.1 opac-main.tmpl,NONE,1.1.2.1 opac-moredetail.tmpl,NONE,1.1.2.1 opac-reserve.tmpl,NONE,1.1.2.1 opac-searchresults.tmpl,NONE,1.1.2.1 opac-search.tmpl,NONE,1.1.2.1 opac-user.tmpl,NONE,1.1.2.1 opac-userupdate.tmpl,NONE,1.1.2.1 subject.tmpl,NONE,1.1.2.1
- Next by thread:
[Koha-cvs] CVS: koha/maint shiftbib.pl,1.3,1.3.2.1
- Index(es):