$q = 'SELECT l.ID,
2015-09-30 22:20 GMT+03:00 Richard Reina <gatorreina@gmail.com>:
> Matched_pats.keys.sort %>. However, In this case though the template only
> displays one row because each resulting row in the SQL query all have the
> same ID number. Is there any simple change I can make to get the results to
> fully iterate?
How could you have hash(ref), where are multiple keys named by same ID?
Could you show your datastructure?
c.ID AS CHLG_ID, c.season, c.YEAR,
g.date, g.opp_team,
a.NAME AS ANAME,
ch.NAME AS CHNAME,
p.AMOUNT,
u.screenname AS SPONSOR
FROM game g, accomp_type a, logro l
LEFT JOIN challenge c ON l.ACC_TYPE_ID=c.ACC_TYPE_ID
LEFT JOIN patrocinio p ON c.ID=p.CHLNG_ID
LEFT JOIN charity ch ON c.CHAR_ID=ch.ID
LEFT JOIN patron pn ON p.PTRN_ID=pn.ID
LEFT JOIN usuario u ON pn.USER_ID=u.ID
WHERE l.GAME_ID=?
AND l.status=?
AND g.ID=l.GAME_ID
AND YEAR(g.DATE)=c.YEAR
AND MONTH(g.date) IN (?, ?, ?)
AND l.ACC_TYPE_ID=a.ID';
$sth = $dbh->prepare($q);
$sth->execute($self->{_game_id}, $self->{_logro_status}, @$season_mo[0], @$season_mo[1], @$season_mo[2]);
my $pats_ref = $sth->fetchall_hashref('ID');