| 
      
            Lines 552-568
          sub _parseletter_sth {
      
      
        Link Here
      
     | 
  
        
          | 552 | 
              # check cache first  | 
          552 | 
              # check cache first  | 
        
        
          | 553 | 
              (defined $handles{$table}) and return $handles{$table}; | 
          553 | 
              (defined $handles{$table}) and return $handles{$table}; | 
        
        
          | 554 | 
              my $query =   | 
          554 | 
              my $query =   | 
        
          
            
              | 555 | 
                  ($table eq 'biblio'       ) ? "SELECT * FROM $table WHERE   biblionumber = ?"                      :  | 
              555 | 
                  ($table eq 'biblio'       ) ? "SELECT * FROM $table WHERE   biblionumber = ?"                                 :  | 
            
            
              | 556 | 
                  ($table eq 'biblioitems'  ) ? "SELECT * FROM $table WHERE   biblionumber = ?"                      :  | 
              556 | 
                  ($table eq 'biblioitems'  ) ? "SELECT * FROM $table WHERE   biblionumber = ?"                                 :  | 
            
            
              | 557 | 
                  ($table eq 'items'        ) ? "SELECT * FROM $table WHERE     itemnumber = ?"                      :  | 
              557 | 
                  ($table eq 'items'        ) ? "SELECT * FROM $table WHERE     itemnumber = ?"                                 :  | 
            
            
              | 558 | 
                  ($table eq 'issues'       ) ? "SELECT * FROM $table WHERE     itemnumber = ?"                      :  | 
              558 | 
                  ($table eq 'issues'       ) ? "SELECT * FROM $table WHERE     itemnumber = ?"                                 :  | 
            
            
              | 559 | 
                  ($table eq 'reserves'     ) ? "SELECT * FROM $table WHERE borrowernumber = ? and biblionumber = ?" :  | 
              559 | 
                  ($table eq 'old_issues'   ) ? "SELECT * FROM $table WHERE     itemnumber = ? ORDER BY timestamp DESC LIMIT 1" :  | 
            
            
              | 560 | 
                  ($table eq 'borrowers'    ) ? "SELECT * FROM $table WHERE borrowernumber = ?"                      :  | 
              560 | 
                  ($table eq 'reserves'     ) ? "SELECT * FROM $table WHERE borrowernumber = ? and biblionumber = ?"            :  | 
            
            
              | 561 | 
                  ($table eq 'branches'     ) ? "SELECT * FROM $table WHERE     branchcode = ?"                      :  | 
              561 | 
                  ($table eq 'borrowers'    ) ? "SELECT * FROM $table WHERE borrowernumber = ?"                                 :  | 
            
            
              | 562 | 
                  ($table eq 'suggestions'  ) ? "SELECT * FROM $table WHERE   suggestionid = ?"                      :  | 
              562 | 
                  ($table eq 'branches'     ) ? "SELECT * FROM $table WHERE     branchcode = ?"                                 :  | 
            
            
              | 563 | 
                  ($table eq 'aqbooksellers') ? "SELECT * FROM $table WHERE             id = ?"                      :  | 
              563 | 
                  ($table eq 'suggestions'  ) ? "SELECT * FROM $table WHERE   suggestionid = ?"                                 :  | 
            
            
              | 564 | 
                  ($table eq 'aqorders'     ) ? "SELECT * FROM $table WHERE    ordernumber = ?"                      :  | 
              564 | 
                  ($table eq 'aqbooksellers') ? "SELECT * FROM $table WHERE             id = ?"                                 :  | 
            
            
              | 565 | 
                  ($table eq 'opac_news'    ) ? "SELECT * FROM $table WHERE          idnew = ?"                      :  | 
              565 | 
                  ($table eq 'aqorders'     ) ? "SELECT * FROM $table WHERE    ordernumber = ?"                                 :  | 
            
            
               | 
               | 
              566 | 
                  ($table eq 'opac_news'    ) ? "SELECT * FROM $table WHERE          idnew = ?"                                 :  | 
            
        
          | 566 | 
              undef ;  | 
          567 | 
              undef ;  | 
        
        
          | 567 | 
              unless ($query) { | 
          568 | 
              unless ($query) { | 
        
        
          | 568 | 
                  warn "ERROR: No _parseletter_sth query for table '$table'";  | 
          569 | 
                  warn "ERROR: No _parseletter_sth query for table '$table'";  |