SQL syntax corrected

This commit is contained in:
tgarip1957 2006-04-12 20:45:40 +00:00
parent 8297a25e2a
commit 5fdc35c4c7
1 changed files with 4 additions and 4 deletions

View File

@ -19,11 +19,11 @@ if ($op eq "export") {
my $dbh=C4::Context->dbh;
my $sth;
if ($start_bib && $end_bib) {
$sth=$dbh->prepare("select biblionumber from biblioitems where timestamp >=? and timestamp <=? order by biblionumber");
$sth->execute($start_bib,$end_bib);
$sth=$dbh->prepare("select biblionumber from biblioitems where timestamp >='$start_bib' and timestamp <='$end_bib' order by biblionumber");
$sth->execute();
} elsif ($start_bib ) {
$sth=$dbh->prepare("select biblionumber from biblioitems where timestamp >=? order by biblionumber");
$sth->execute($start_bib);
$sth=$dbh->prepare("select biblionumber from biblioitems where timestamp >='$start_bib' order by biblionumber");
$sth->execute();
}else {
$sth=$dbh->prepare("select biblionumber from biblioitems order by biblionumber");
$sth->execute();