<div dir="ltr"><div><div><div>As far as I know you can do something like this:<br>$rows_ref = $sth->fetchall_hashref( ['ID', 'AnotherID' ] )<br><br></div>To specify multiple ID's to be unique by, as I've had that same issue in the past.<br></div>Then do a data Dumper to see what the structure looks like.<br><br></div>David<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 1, 2015 at 8:30 AM, Yitzchak Scott-Thoennes <span dir="ltr"><<a href="mailto:sthoenna@gmail.com" target="_blank">sthoenna@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wed, Sep 30, 2015 at 2:41 PM, Richard Reina <<a href="mailto:gatorreina@gmail.com">gatorreina@gmail.com</a>> wrote:<br>
> Well something somewhat strange has happened. When I do:  print<br>
> Dumper($pats_ref) . "\n"; from the perl module that handles the DB query it<br>
> only prints one row:<br>
><br>
> $VAR1 = {<br>
>           '8' => {<br>
>                    'ID' => '8',<br>
>                    'ANAME' => 'KOB',<br>
>                    'opp_team' => 'Cardinals',<br>
>                    'YEAR' => '2015',<br>
>                    'date' => '2015-09-04',<br>
>                    'AMOUNT' => '2.00',<br>
>                    'IDD' => '3',<br>
>                    'CHNAME' => 'DWB',<br>
>                    'CHLG_ID' => '12',<br>
>                    'SPONSOR' => 'MPK',<br>
>                    'season' => 'Fall'<br>
>                  }<br>
>         };<br>
><br>
> This is baffling and very frustrating because when I do the exact same query<br>
> from the MySQL console it yields 3 row and not 1 row.<br>
><br>
>  ID | CHLG_ID | season | YEAR | date  | opp_team | NAME  | NAME<br>
> | AMOUNT | sponsor |<br>
> +----+---------+--------+------+------------+----------+-----------+-----------------------------+--------+---------+-------------<br>
> |  8 |       9  | Fall   | 2015 | 2015-09-04  | Cardinals    | KOB | AFA<br>
> |   2.00 | MPK |<br>
> |  8 |      12 | Fall   | 2015 | 2015-09-04 | Cardinals     | KOB | DWB<br>
> |   1.00 | RFR  |<br>
> |  8 |      12 | Fall   | 2015 | 2015-09-04 | Cardinals     | KOB | DWB<br>
> |   2.00 | MPK |<br>
> +----+---------+--------+------+------------+----------+-----------+-----------------------------+--------+---------+<br>
><br>
>  Any insight as to why this might be happening would be greatly, greatly<br>
> appreciated.<br>
<br>
</div></div>You are telling DBI to put the results in a hash by ID.  So later rows<br>
overwrite earlier ones.<br>
<br>
You probably want fetchall_arrayref( {} ) instead of fetchall_hashref,<br>
but I don't remember seeing what you want to end up doing with the<br>
data.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
dancer-users mailing list<br>
<a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a><br>
<a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
</div></div></blockquote></div><br></div>