9 for (my $i=1;$i<59;$i++){
10 my $query = "Select authorisedby,entrydate from aqorders where booksellerid='$i'";
11 $query.=" group by authorisedby,entrydate order by entrydate";
12 my $sth=$dbh->prepare($query);
14 while (my $data=$sth->fetchrow_hashref){
16 $data->{'authorisedby'}=~ s/\'/\\\'/g;
17 my $query2="update aqorders set basketno='$basket' where booksellerid='$i' and authorisedby=
18 '$data->{'authorisedby'}' and entrydate='$data->{'entrydate'}'";
19 my $sth2=$dbh->prepare($query2);