($ML{'error.noremote'}) unless $remote; $body .= ""; $body .= ""; # print dollars my $damt = sub { sprintf("\$%.02f", shift()) }; my $dbh = LJ::get_db_writer(); my $sth = $dbh->prepare("SELECT * FROM payments " . "WHERE userid=? AND anum IS NOT NULL AND (used='Y' OR used='N' " . "OR (used='C' AND datesent>(NOW() - INTERVAL 1 MONTH)))"); $sth->execute($remote->{'userid'}); my @rows = (); push @rows, $_ while $_ = $sth->fetchrow_hashref; unless (@rows) { $body .= "
Date | Status | "; $body .= "Amount | Order ID |
---|---|---|---|
$row->{'datesent'} | "; $body .= "" . ($row->{'used'} eq 'C' ? "pending" : "completed") . " | "; $body .= "" . $damt->($row->{'amount'}) . " | "; my $id = "$row->{'payid'}-$row->{'anum'}"; $body .= "[$id] |