http://www.perlmonks.org?node_id=202159


in reply to selectrow_hashref upper/lower case

From DBI.pm:

       "FetchHashKeyName" (string, inherited)
           This attribute is used to specify which attribute name
           the fetchrow_hashref() method should use to get the
           field names for the hash keys. For historical reasons
           it defaults to '"NAME"' but it is recommended to set
           it to '"NAME_lc"' or '"NAME_uc"' according to your
           ...

So something like this is probably what you want:

$dbh->{FetchHashKeyName} = 'NAME_lc';
Also, if you implemented LIMIT in code, you could try rownum, eg:
select * from foo where rownum < 6;

Replies are listed 'Best First'.
Re: Re: selectrow_hashref upper/lower case
by runrig (Abbot) on Oct 02, 2002 at 00:49 UTC
    ..., you could try rownum...

    I forgot about that. I do remember though, that rownum is useless if you have an ORDER BY clause, because it limits the number of rows selected (regardless of order), and THEN it orders what got selected.

      Yes, I knew this method, but I discarded it for the same reason. Thank you very much again runrig!

      Ciao, Valerio