Got a problem with query output using perl
my $query = "SELECT id, handle, DATE_FORMAT(insert_date, '%l:%i:%S %p') FROM session ORDER BY insert_date";
my $sth = $dbh->prepare($query);
$sth->execute;
my $data = $sth->fetchrow_hashref;
print "$data->{insert_date}";
The issue is that when I query the results as a hashref or arrayref_all the 'field name (insert_date)' returns a undef value.
Any suggestions?
my $query = "SELECT id, handle, DATE_FORMAT(insert_date, '%l:%i:%S %p') FROM session ORDER BY insert_date";
my $sth = $dbh->prepare($query);
$sth->execute;
my $data = $sth->fetchrow_hashref;
print "$data->{insert_date}";
The issue is that when I query the results as a hashref or arrayref_all the 'field name (insert_date)' returns a undef value.
Any suggestions?