chris
24 years ago
3 changed files with 81 additions and 0 deletions
@ -0,0 +1,27 @@ |
|||
#!/usr/bin/perl |
|||
|
|||
use strict; |
|||
use C4::Database; |
|||
|
|||
my $dbh=C4Connect; |
|||
my $count=0; |
|||
my $basket='HLT-'; |
|||
for (my $i=1;$i<59;$i++){ |
|||
my $query = "Select authorisedby,entrydate from aqorders where booksellerid='$i'"; |
|||
$query.=" group by authorisedby,entrydate order by entrydate"; |
|||
my $sth=$dbh->prepare($query); |
|||
$sth->execute; |
|||
while (my $data=$sth->fetchrow_hashref){ |
|||
$basket=$count; |
|||
$data->{'authorisedby'}=~ s/\'/\\\'/g; |
|||
my $query2="update aqorders set basketno='$basket' where booksellerid='$i' and authorisedby= |
|||
'$data->{'authorisedby'}' and entrydate='$data->{'entrydate'}'"; |
|||
my $sth2=$dbh->prepare($query2); |
|||
$sth2->execute; |
|||
$sth2->finish; |
|||
$count++; |
|||
} |
|||
$sth->finish; |
|||
} |
|||
|
|||
$dbh->disconnect; |
@ -0,0 +1,35 @@ |
|||
#!/usr/bin/perl |
|||
|
|||
use strict; |
|||
use C4::Database; |
|||
|
|||
my $dbh=C4Connect; |
|||
my $count=0; |
|||
my $query="Select biblionumber from aqorders where datereceived = '0000-00-00'"; |
|||
my $sth=$dbh->prepare($query); |
|||
$sth->execute; |
|||
|
|||
my $query2="Select max(biblioitemnumber) from biblioitems"; |
|||
my $sth2=$dbh->prepare($query2); |
|||
$sth2->execute; |
|||
my $data=$sth2->fetchrow_hashref; |
|||
my $bibitemno=$data->{'max(biblioitemnumber)'}; |
|||
print $bibitemno; |
|||
$bibitemno++; |
|||
$sth2->finish; |
|||
while (my $data=$sth->fetchrow_hashref){ |
|||
$sth2=$dbh->prepare("insert into biblioitems (biblioitemnumber,biblionumber) values |
|||
($bibitemno,$data->{'biblionumber'})"); |
|||
$sth2->execute; |
|||
$sth2->finish; |
|||
$sth2=$dbh->prepare("update aqorders set biblioitemnumber=$bibitemno where biblionumber |
|||
=$data->{'biblionumber'}"); |
|||
$sth2->execute; |
|||
$sth2->finish; |
|||
$bibitemno++ |
|||
|
|||
} |
|||
$sth->finish; |
|||
|
|||
|
|||
$dbh->disconnect; |
@ -0,0 +1,19 @@ |
|||
#!/usr/bin/perl |
|||
|
|||
use C4::Database; |
|||
use CGI; |
|||
use strict; |
|||
use C4::Acquisitions; |
|||
|
|||
my $input= new CGI; |
|||
#print $input->header; |
|||
#print $input->dump; |
|||
|
|||
my $title=$input->param('Title'); |
|||
my $author=$input->param('Author'); |
|||
my $bibnum=$input->param('bibnum'); |
|||
my $copyright=$input->param('Copyright'); |
|||
|
|||
modbiblio($bibnum,$title,$author,$copyright); |
|||
|
|||
print $input->redirect("detail.pl?type=intra&bib=$bibnum"); |
Loading…
Reference in new issue