- my $sth = $dbh->prepare("select id,host,name,checked from z3950servers where recordtype <> 'authority' order by host");
- $sth->execute();
- my $serverloop = $sth->fetchall_arrayref( {} );
+ my $schema = Koha::Database->new()->schema();
+ my $rs = $schema->resultset('Z3950server')->search(
+ {
+ recordtype => 'biblio',
+ servertype => ['zed', 'sru'],
+ },
+ { result_class => 'DBIx::Class::ResultClass::HashRefInflator',
+ order_by => ['rank', 'servername'],
+ },
+ );