<%perl>
$sth = $dbh->prepare(<<END);
SELECT *
- FROM addresses
- LEFT JOIN config USING (emailaddr)
+ FROM config
+ LEFT JOIN addresses USING (emailaddr)
LEFT JOIN texts USING (textid)
ORDER BY emailaddr
END
<td>Address</td>
<td>Status</td>
<td>Which message?</td>
-<td>Expiry date</td>
</tr><tr>
% while (my $row= $sth->fetchrow_hashref()) {
<tr>
<td><% $row->{'emailaddr'} |h %></td>
% if (defined $row->{'textid'}) {
-% my $expires = expires2timet($row->{'expires'});
-% if (defined($expires) && $expires < time) {
-<td>expired</td>
-% } else {
-<td>active</td>
-% }
<td><% $row->{'desc'} |h %></td>
-<td><% expirestime2show($expires) |h %></td>
% } else {
<td>inactive</td>
<td></td>