ibra has asked for the wisdom of the Perl Monks concerning the following question:
Here I call the method returning the @transactions array. This is the line where I'm trying to print the date valuemy @transactions; my $sth = $db_h->Query(" SELECT serial_num, FROM_UNIXTIME(trans_date) AS 'Actio +n_date', actor, type, trans_data, content FROM transtable ORDER BY serial_num; "); $sth->execute(); while( my $trans_hash = $sth->fetchrow_hashref("NAME_lc") ) { push (@transactions,$trans_hash); } return @transactions;
print " <td style='background-color:#f0f0f0;' ><b>$transaction->{'Act +ion_date'}</b></td>";
I really appreciate any feedback as I'm new to perl Thank youmy @trans_array = (); my @trans_array = &Cpt::transactions_summary( $current_user ); foreach my $transaction (@trans_array) { print "<tr>"; print " <td style='background-color:#f0f0f0;' ><b>$transaction->{ +'serial_num'}</b></td>"; print " <td style='background-color:#f0f0f0;' ><b>$transaction->{ +'Action_date'}</b></td>"; + print " <td style='background-color:#f0f0f0;' ><b>$transaction->{ +'actor'}</b></td>"; print " <td style='background-color:#f0f0f0;' ><b>$transaction->{ +'type'}</b></td>"; print " <td style='background-color:#f0f0f0;' ><b>$transaction->{ +'trans_data'}</b></td>"; print " <td style='background-color:#f0f0f0;' ><b>$transaction->{ +'content'}</b></td>"; print "</tr>"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem converting with FROM_UNIXTIME
by rev_1318 (Chaplain) on Jun 23, 2011 at 13:22 UTC | |
by ibra (Novice) on Jun 23, 2011 at 14:16 UTC | |
by ibra (Novice) on Jun 23, 2011 at 14:22 UTC | |
|
Re: Problem converting with FROM_UNIXTIME
by martell (Hermit) on Jun 23, 2011 at 13:17 UTC |