[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 Search.pm,1.99.2.2,1.99.2.3
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha/C4 Search.pm,1.99.2.2,1.99.2.3 |
Date: |
Thu, 17 Feb 2005 04:46:43 -0800 |
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv324/C4
Modified Files:
Tag: rel_2_2
Search.pm
Log Message:
in member search, adding an option to order result by name or cardnumber
Index: Search.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Search.pm,v
retrieving revision 1.99.2.2
retrieving revision 1.99.2.3
diff -C2 -r1.99.2.2 -r1.99.2.3
*** Search.pm 10 Feb 2005 13:15:27 -0000 1.99.2.2
--- Search.pm 17 Feb 2005 12:46:41 -0000 1.99.2.3
***************
*** 1794,1798 ****
#called by member.pl
sub BornameSearch {
! my ($env,$searchstring,$type)address@hidden;
my $dbh = C4::Context->dbh;
my $query = ""; my $count; my @data;
--- 1794,1798 ----
#called by member.pl
sub BornameSearch {
! my ($env,$searchstring,$orderby,$type)address@hidden;
my $dbh = C4::Context->dbh;
my $query = ""; my $count; my @data;
***************
*** 1801,1805 ****
if($type eq "simple") # simple search for one letter only
{
! $query="Select * from borrowers where surname like ? order by
surname,firstname";
@bind=("$searchstring%");
}
--- 1801,1805 ----
if($type eq "simple") # simple search for one letter only
{
! $query="Select * from borrowers where surname like ? order by
$orderby";
@bind=("$searchstring%");
}
***************
*** 1822,1827 ****
# FIXME - .= <<EOT;
}
! $query=$query.") or cardnumber = ?
! order by surname,firstname";
push(@bind,$searchstring);
# FIXME - .= <<EOT;
--- 1822,1827 ----
# FIXME - .= <<EOT;
}
! $query=$query.") or cardnumber like ?
! order by $orderby";
push(@bind,$searchstring);
# FIXME - .= <<EOT;
***************
*** 1829,1832 ****
--- 1829,1833 ----
my $sth=$dbh->prepare($query);
+ warn "Q $orderby : $query";
$sth->execute(@bind);
my @results;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 Search.pm,1.99.2.2,1.99.2.3,
Paul POULAIN <=