Please find attached patch ...
--- MySQL.pm.bak 2011-01-04 15:08:42.000000000 +0000
+++ MySQL.pm 2011-01-04 15:53:10.000000000 +0000
@@ -385,6 +385,29 @@
return \@records;
}
+=head2 list_all_records(\$domain)
+
+Expects a scalar reference to a domain name.
+Returns a reference to a two-dimensional array which contains the resource record name, type,
+content, TTL, and priority if any of the supplied domain.
+
+=cut
+
+sub list_all_records($$)
+{
+ my $self = shift;
+ my $domain = shift;
+ my @records;
+
+ my $sth = $self->{'dbh'}->prepare("SELECT name,type,content,ttl,prio FROM records WHERE domain_id = (SELECT id FROM domains WHERE name = ?)");
+ $sth->execute($$domain);
+
+ while ( my ($name,$type,$content,$ttl,$prio) = $sth->fetchrow_array )
+ { push @records , [ ($name,$type,$content,$ttl,$prio) ]; } # push anonymous array on to end.
+
+ return \@records;
+}
+
=head2 add_record(\$rr , \$domain)
Adds a single record to the backend.