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>"; }
In reply to Problem converting with FROM_UNIXTIME by ibra
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |