Re: dbi selectall_hashref drops results

"Martin J. Evans" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <[email protected]>
On 15/05/15 15:56, Kyle A. Hamilton wrote:
> I ran into an issue where dbi’s selectall_hashref will drop results
> returned from the database. If I change the query to count the number
> of results returned, it returns 96, but I am missing some records
> that I get when I manually query the database. If I use
> selectall_array ref and loop through the results, I get the same data
> as I get from manually querying the database. I can provide the
> proprietary code as an example, just want to make sure this is the
> correct place to submit this.

For selectall_hashref you have to give it a key field. If that field is not a unique key you will lose rows.

Martin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.